Module: Arturo::ControllerFilters::ClassMethods

Defined in:
lib/arturo/controller_filters.rb

Instance Method Summary collapse

Instance Method Details

#require_feature(name, options = {}) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/arturo/controller_filters.rb', line 21

def require_feature(name, options = {})
  before_filter options do |controller|
    unless controller.feature_enabled?(name)
      controller.on_feature_disabled(name)
    end
  end
end