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:
32 33 34 35 |
# File 'actionpack/lib/action_controller/metal/strong_parameters.rb', line 32 def initialize(params) # :nodoc: @params = params super("found unpermitted parameters: #{params.join(", ")}") end |
Instance Attribute Details
#params ⇒ Object (readonly)
:nodoc:
30 31 32 |
# File 'actionpack/lib/action_controller/metal/strong_parameters.rb', line 30 def params @params end |