aboutsummaryrefslogtreecommitdiffstats
path: root/lib/af83/decorator.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/af83/decorator.rb')
-rw-r--r--lib/af83/decorator.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/af83/decorator.rb b/lib/af83/decorator.rb
index 80958fa02..d2e049857 100644
--- a/lib/af83/decorator.rb
+++ b/lib/af83/decorator.rb
@@ -196,6 +196,7 @@ class AF83::Decorator < ModelDecorator
end
enabled = enabled && check_policy(@options[:_policy]) if @options[:_policy].present?
+ enabled = enabled && check_feature(@options[:_feature]) if @options[:_feature].present?
enabled
end
@@ -204,6 +205,10 @@ class AF83::Decorator < ModelDecorator
@context.check_policy policy
end
+ def check_feature(feature)
+ @context.check_feature feature
+ end
+
def errors
"Missing attributes: #{@missing_attributes.to_sentence}"
end