diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-07-05 20:06:29 -0700 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-07-05 20:06:29 -0700 |
commit | 8ce61a366474b20368f60eb1c7bf31c3b7297873 (patch) | |
tree | b25681e3b83dedf8858e3ccf9d53472d0f3eba61 /activerecord/lib/active_record | |
parent | a5efd5800c1e93f0932c30e885c98de04cb00572 (diff) | |
parent | a1ad02a4af213abfcd7c6602e6f2d281530c47cc (diff) | |
download | rails-8ce61a366474b20368f60eb1c7bf31c3b7297873.tar.gz rails-8ce61a366474b20368f60eb1c7bf31c3b7297873.tar.bz2 rails-8ce61a366474b20368f60eb1c7bf31c3b7297873.zip |
Merge pull request #6927 from parndt/patch-3
Make ArgumentError message more consistent in nested attributes
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/nested_attributes.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/nested_attributes.rb b/activerecord/lib/active_record/nested_attributes.rb index 841681e542..7febb5539f 100644 --- a/activerecord/lib/active_record/nested_attributes.rb +++ b/activerecord/lib/active_record/nested_attributes.rb @@ -351,7 +351,7 @@ module ActiveRecord if respond_to?(method) send(method, attributes.except(*unassignable_keys(assignment_opts)), assignment_opts) else - raise ArgumentError, "Cannot build association #{association_name}. Are you trying to build a polymorphic one-to-one association?" + raise ArgumentError, "Cannot build association `#{association_name}'. Are you trying to build a polymorphic one-to-one association?" end end end @@ -373,7 +373,7 @@ module ActiveRecord # }) # # Will update the name of the Person with ID 1, build a new associated - # person with the name `John', and mark the associated Person with ID 2 + # person with the name 'John', and mark the associated Person with ID 2 # for destruction. # # Also accepts an Array of attribute hashes: |