Exception: ActionController::UnpermittedParameters
- Defined in:
- actionpack/lib/action_controller/metal/strong_parameters.rb
Overview
Raised when a supplied parameter is not expected.
params = ActionController::Parameters.new(a: "123", b: "456")
params.permit(:c)
# => ActionController::UnpermittedParameters: found unexpected keys: a, b
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
:nodoc:.
Instance Method Summary collapse
-
#initialize(params) ⇒ UnpermittedParameters
constructor
:nodoc:.
Constructor Details
#initialize(params) ⇒ UnpermittedParameters
:nodoc:
33 34 35 36 |
# File 'actionpack/lib/action_controller/metal/strong_parameters.rb', line 33 def initialize(params) # :nodoc: @params = params super("found unpermitted parameters: #{params.join(", ")}") end |
Instance Attribute Details
#params ⇒ Object (readonly)
:nodoc:
31 32 33 |
# File 'actionpack/lib/action_controller/metal/strong_parameters.rb', line 31 def params @params end |