Exception: ActionController::MethodNotAllowed
- Inherits:
-
ActionControllerError
- Object
- StandardError
- ActionControllerError
- ActionController::MethodNotAllowed
- Defined in:
- lib/action_controller/metal/exceptions.rb
Overview
:nodoc:
Direct Known Subclasses
Instance Attribute Summary collapse
-
#allowed_methods ⇒ Object
readonly
Returns the value of attribute allowed_methods.
Instance Method Summary collapse
-
#initialize(*allowed_methods) ⇒ MethodNotAllowed
constructor
A new instance of MethodNotAllowed.
Constructor Details
#initialize(*allowed_methods) ⇒ MethodNotAllowed
Returns a new instance of MethodNotAllowed.
19 20 21 |
# File 'lib/action_controller/metal/exceptions.rb', line 19 def initialize(*allowed_methods) super("Only #{allowed_methods.to_sentence(:locale => :en)} requests are allowed.") end |
Instance Attribute Details
#allowed_methods ⇒ Object (readonly)
Returns the value of attribute allowed_methods.
17 18 19 |
# File 'lib/action_controller/metal/exceptions.rb', line 17 def allowed_methods @allowed_methods end |