Module: Fortress::Controller::ClassMethods

Defined in:
lib/fortress/controller.rb

Overview

Class methods added to all controllers in a Rails application.

Author:

  • zedtux

Instance Method Summary collapse

Instance Method Details

#fortress_allow(actions, options = {}) ⇒ Object



45
46
47
48
49
50
# File 'lib/fortress/controller.rb', line 45

def fortress_allow(actions, options = {})
  (options.blank? || actions == :all) &&
    Mechanism.authorise!(name, actions)

  Mechanism.parse_options(self, actions, options) if options.present?
end