diff options
author | José Valim <jose.valim@gmail.com> | 2009-12-31 12:29:44 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-02 22:27:02 +0100 |
commit | dcafe995bfe51e53dd04607956be9b54073e9cb6 (patch) | |
tree | d48929d0bc22d50c90172f1323877bcbfccbadbe /activerecord/lib/active_record/autosave_association.rb | |
parent | ac1df91e5eac4959c0030e2b2ea39968f7f9ba1a (diff) | |
download | rails-dcafe995bfe51e53dd04607956be9b54073e9cb6.tar.gz rails-dcafe995bfe51e53dd04607956be9b54073e9cb6.tar.bz2 rails-dcafe995bfe51e53dd04607956be9b54073e9cb6.zip |
Make nested attributes behave like in 2.3.5 and add a sanity test for it with I18n.
Diffstat (limited to 'activerecord/lib/active_record/autosave_association.rb')
-rw-r--r-- | activerecord/lib/active_record/autosave_association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/autosave_association.rb b/activerecord/lib/active_record/autosave_association.rb index 44c668b619..98ab64537e 100644 --- a/activerecord/lib/active_record/autosave_association.rb +++ b/activerecord/lib/active_record/autosave_association.rb @@ -267,7 +267,7 @@ module ActiveRecord unless valid = association.valid? if reflection.options[:autosave] association.errors.each do |attribute, message| - attribute = "#{reflection.name}_#{attribute}" + attribute = "#{reflection.name}.#{attribute}" errors[attribute] << message if errors[attribute].empty? end else |