Class: Cathode::CustomAction
Overview
Provides additional behavior for non-default actions.
Instance Attribute Summary
Attributes inherited from Action
#action_access_filter, #action_block, #http_method, #name, #override_block, #resource, #strong_params
Instance Method Summary collapse
-
#after_initialize ⇒ Object
Raises an error if the action was defined without an HTTP method.
Methods inherited from Action
#allowed?, create, #initialize
Methods included from ActionDsl
#actions, #custom_actions, #default_actions
Constructor Details
This class inherits a constructor from Cathode::Action
Instance Method Details
#after_initialize ⇒ Object
Raises an error if the action was defined without an HTTP method
234 235 236 237 238 |
# File 'lib/cathode/action.rb', line 234 def after_initialize if http_method.nil? raise RequestMethodMissingError, "You must specify an HTTP method (get, put, post, delete) for action `#{@name}'" end end |