Commit 2ef399a5 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Use `check_<feature>_available!` to trigger method missing

Similar to how we check project features.
parent cf98a6d5
...@@ -7,7 +7,7 @@ module EE ...@@ -7,7 +7,7 @@ module EE
def method_missing(method_sym, *arguments, &block) def method_missing(method_sym, *arguments, &block)
case method_sym.to_s case method_sym.to_s
when /\Acheck_group_(.*)_available!\z/ when /\Acheck_(.*)_available!\z/
check_group_feature_available!($1.to_sym) check_group_feature_available!($1.to_sym)
else else
super super
......
class Groups::AnalyticsController < Groups::ApplicationController class Groups::AnalyticsController < Groups::ApplicationController
before_action :group before_action :group
before_action :check_group_contribution_analytics_available! before_action :check_contribution_analytics_available!
layout 'group' layout 'group'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment