Module: Trax::Controller::ActionTypes

Extended by:
ActiveSupport::Concern
Included in:
Trax::Controller
Defined in:
lib/trax/controller/action_types.rb

Instance Method Summary collapse

Instance Method Details

#collection_action?Boolean



20
21
22
# File 'lib/trax/controller/action_types.rb', line 20

def collection_action?
  self.class.action_types[:collection].include?(current_action)
end

#current_actionObject



16
17
18
# File 'lib/trax/controller/action_types.rb', line 16

def current_action
  :"#{request.params["action"]}"
end

#resource_action?Boolean



24
25
26
# File 'lib/trax/controller/action_types.rb', line 24

def resource_action?
  self.class.action_types[:resource].include? current_action
end