From c67e985994362290308073ed2793dd8e7f2a76db Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Thu, 10 Apr 2008 13:48:43 +0000 Subject: Ensure that save on child object fails for invalid belongs_to association. Closes #11555. [rubyruy] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9247 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/associations.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 7d27b0607a..3ea933875d 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -922,6 +922,8 @@ module ActiveRecord ) end + add_single_associated_save_callbacks(reflection.name) + configure_dependency_for_belongs_to(reflection) end -- cgit v1.2.3