1
0
Fork 0
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:
Yves Senn 2015-06-22 08:44:16 +02:00
commit 8bf60b02b8

View file

@ -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: