mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #20659 from vngrs/strong_parameters_unpermitted_parameters_wrong_doc_fix
Fix the documentation about ActionController::UnpermittedParameters [ci skip]
This commit is contained in:
commit
8bf60b02b8
1 changed files with 4 additions and 2 deletions
|
@ -23,11 +23,13 @@ module ActionController
|
|||
end
|
||||
end
|
||||
|
||||
# Raised when a supplied parameter is not expected.
|
||||
# Raised when a supplied parameter is not expected and
|
||||
# ActionController::Parameters.action_on_unpermitted_parameters
|
||||
# is set to <tt>:raise</tt>.
|
||||
#
|
||||
# params = ActionController::Parameters.new(a: "123", b: "456")
|
||||
# params.permit(:c)
|
||||
# # => ActionController::UnpermittedParameters: found unexpected keys: a, b
|
||||
# # => ActionController::UnpermittedParameters: found unpermitted parameters: a, b
|
||||
class UnpermittedParameters < IndexError
|
||||
attr_reader :params # :nodoc:
|
||||
|
||||
|
|
Loading…
Reference in a new issue