Class: Cuprum::Rails::Actions::Middleware::Resources::Find
- Inherits:
-
Query
- Object
- Command
- Cuprum::Rails::Action
- Query
- Cuprum::Rails::Actions::Middleware::Resources::Find
- Defined in:
- lib/cuprum/rails/actions/middleware/resources/find.rb
Overview
Middleware for querying a resource.
Instance Attribute Summary
Attributes inherited from Query
Attributes inherited from Cuprum::Rails::Action
#options, #repository, #request
Instance Method Summary collapse
-
#initialize(only_form_actions: false, **resource_params) ⇒ Find
constructor
A new instance of Find.
-
#only_form_actions? ⇒ Boolean
If true, does not query the resource for non-GET success results.
Methods inherited from Cuprum::Rails::Action
Constructor Details
#initialize(only_form_actions: false, **resource_params) ⇒ Find
Returns a new instance of Find.
12 13 14 15 16 |
# File 'lib/cuprum/rails/actions/middleware/resources/find.rb', line 12 def initialize(only_form_actions: false, **resource_params) super(**resource_params) @only_form_actions = !!only_form_actions end |
Instance Method Details
#only_form_actions? ⇒ Boolean
Returns if true, does not query the resource for non-GET success results.
20 21 22 |
# File 'lib/cuprum/rails/actions/middleware/resources/find.rb', line 20 def only_form_actions? @only_form_actions end |