Class: Cathode::ShowRequest
- Defined in:
- lib/cathode/show_request.rb
Overview
Defines the default behavior for a show request.
Instance Attribute Summary
Attributes inherited from Request
#_body, #_status, #action, #context, #custom_logic, #resource
Instance Method Summary collapse
-
#default_action_block ⇒ Object
Determine the default action to use depending on the resource.
Methods inherited from Request
Constructor Details
This class inherits a constructor from Cathode::Request
Instance Method Details
#default_action_block ⇒ Object
Determine the default action to use depending on the resource. If the resource is singular, set the body to the parent’s associated record. Otherwise, lookup the record directly.
7 8 9 10 11 |
# File 'lib/cathode/show_request.rb', line 7 def default_action_block proc do body record end end |