diff options
Diffstat (limited to 'activerecord')
-rwxr-xr-x | activerecord/lib/active_record/associations.rb | 2 | ||||
-rw-r--r-- | activerecord/test/models/developer.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index cbdb145078..fc186f806c 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -940,7 +940,7 @@ module ActiveRecord ) end - add_single_associated_save_callbacks(reflection.name) unless options[:validate] == false + add_single_associated_save_callbacks(reflection.name) if options[:validate] == true configure_dependency_for_belongs_to(reflection) end diff --git a/activerecord/test/models/developer.rb b/activerecord/test/models/developer.rb index 7a64bed5ff..9f26cacdec 100644 --- a/activerecord/test/models/developer.rb +++ b/activerecord/test/models/developer.rb @@ -56,8 +56,8 @@ class Developer < ActiveRecord::Base end class AuditLog < ActiveRecord::Base - belongs_to :developer - belongs_to :unvalidated_developer, :class_name => 'Developer', :validate => false + belongs_to :developer, :validate => true + belongs_to :unvalidated_developer, :class_name => 'Developer' end DeveloperSalary = Struct.new(:amount) |