module Authority::Controller::ClassMethods
Public Instance Methods
add_actions(action_map)
click to toggle source
Adds the passed in actions to the current action map.
@param [Hash] action_map - controller actions and methods to be merged with the existing action map
# File lib/authority/controller.rb, line 103 def add_actions(action_map) authority_action_map.merge!(action_map) end
force_action(forced_action)
click to toggle source
Updates the current action map to use the forced action for all of it's actions.
@param [String OR Symbol] forced_action - the authority action to use for all Rails actions in the action map
# File lib/authority/controller.rb, line 112 def force_action(forced_action) add_actions( Hash[authority_action_map.map {|key, _| [key, forced_action] }] ) end