Module: Archangel::Helpers::ActionableConcern
- Extended by:
- ActiveSupport::Concern
- Included in:
- BackendController
- Defined in:
- app/controllers/concerns/archangel/helpers/actionable_concern.rb
Overview
Helper action concern
Instance Method Summary collapse
-
#action ⇒ Symbol
Controller action name as a symbol.
-
#collection_action? ⇒ Boolean
Test if action is a collection action.
-
#member_action? ⇒ Boolean
Test if action is a member action.
Instance Method Details
#action ⇒ Symbol
Controller action name as a symbol
35 36 37 |
# File 'app/controllers/concerns/archangel/helpers/actionable_concern.rb', line 35 def action action_name.to_sym end |
#collection_action? ⇒ Boolean
Test if action is a collection action
Actions include [:index]
46 47 48 |
# File 'app/controllers/concerns/archangel/helpers/actionable_concern.rb', line 46 def collection_action? collection_actions.include?(action) end |
#member_action? ⇒ Boolean
Test if action is a member action
Actions include [:show, :edit, :update]
57 58 59 |
# File 'app/controllers/concerns/archangel/helpers/actionable_concern.rb', line 57 def member_action? member_actions.include?(action) end |