Make nested attributes behave like in 2.3.5 and add a sanity test for it with I18n.

This commit is contained in:
José Valim
2009-12-31 12:29:44 +01:00
parent ac1df91e5e
commit dcafe995bf
3 changed files with 25 additions and 9 deletions

View File

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