Exception: ActionController::MethodNotAllowed

Inherits:
ActionControllerError show all
Defined in:
actionpack/lib/action_controller/metal/exceptions.rb

Overview

:nodoc:

Direct Known Subclasses

NotImplemented

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*allowed_methods) ⇒ MethodNotAllowed

Returns a new instance of MethodNotAllowed.



19
20
21
# File 'actionpack/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_methodsObject (readonly)

Returns the value of attribute allowed_methods



17
18
19
# File 'actionpack/lib/action_controller/metal/exceptions.rb', line 17

def allowed_methods
  @allowed_methods
end