aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-12-31 12:29:44 +0100
committerJosé Valim <jose.valim@gmail.com>2010-01-02 22:27:02 +0100
commitdcafe995bfe51e53dd04607956be9b54073e9cb6 (patch)
treed48929d0bc22d50c90172f1323877bcbfccbadbe /activerecord/lib
parentac1df91e5eac4959c0030e2b2ea39968f7f9ba1a (diff)
downloadrails-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')
-rw-r--r--activerecord/lib/active_record/autosave_association.rb2
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