diff options
author | Nerian <siotopo@gmail.com> | 2013-07-27 18:37:28 +0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-12-03 00:12:04 -0200 |
commit | 2ebf47aea21ff8ac10681e53e78dd7a0e5c31c6e (patch) | |
tree | 9700c9f7472cd188f0919bed090f7c1210cb973f /activerecord/MIT-LICENSE | |
parent | 6e905e21b1b3a8114d1499775061b65556c9964e (diff) | |
download | rails-2ebf47aea21ff8ac10681e53e78dd7a0e5c31c6e.tar.gz rails-2ebf47aea21ff8ac10681e53e78dd7a0e5c31c6e.tar.bz2 rails-2ebf47aea21ff8ac10681e53e78dd7a0e5c31c6e.zip |
Modify the Hash#assert_valid_keys error message so that it shows the valid keys. Also, show the wrong value as it was entered.
{ :failore => "stuff", :funny => "business" }.assert_valid_keys([ :failure, :funny ])
=> ArgumentError: Unknown key: failore
{ 'failore' => "stuff", :funny => "business" }.assert_valid_keys([ :failure, :funny ])
=> ArgumentError: Unknown key: failore
{ 'failore' => "stuff", :funny => "business" }.assert_valid_keys([ :failure, :funny ])
=> ArgumentError: Unknown key: "failore". Valid keys are: :failure, :funny
{ :failore => "stuff", :funny => "business" }.assert_valid_keys([ :failure, :funny ])
=> ArgumentError: Unknown key: :failore. Valid keys are: :failure, :funny
Conflicts:
activerecord/CHANGELOG.md
Closes #11624.
Diffstat (limited to 'activerecord/MIT-LICENSE')
0 files changed, 0 insertions, 0 deletions