Module: PowerApi::GeneratorHelper::ControllerActionsHelper
- Extended by:
- ActiveSupport::Concern
- Included in:
- PowerApi::GeneratorHelpers
- Defined in:
- lib/power_api/generator_helper/controller_actions_helper.rb
Constant Summary collapse
- PERMITTED_ACTIONS =
['index', 'create', 'show', 'update', 'destroy']
Instance Attribute Summary collapse
-
#controller_actions ⇒ Object
Returns the value of attribute controller_actions.
Instance Method Summary collapse
Instance Attribute Details
#controller_actions ⇒ Object
Returns the value of attribute controller_actions.
6 7 8 |
# File 'lib/power_api/generator_helper/controller_actions_helper.rb', line 6 def controller_actions @controller_actions end |
Instance Method Details
#collection_actions? ⇒ Boolean
20 21 22 |
# File 'lib/power_api/generator_helper/controller_actions_helper.rb', line 20 def collection_actions? index? || create? end |
#resource_actions? ⇒ Boolean
16 17 18 |
# File 'lib/power_api/generator_helper/controller_actions_helper.rb', line 16 def resource_actions? show? || update? || destroy? end |
#update_or_create? ⇒ Boolean
24 25 26 |
# File 'lib/power_api/generator_helper/controller_actions_helper.rb', line 24 def update_or_create? update? || create? end |