From e19bd169fac08052e7f0ae4ae4e5ac368629d31f Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 2 Oct 2005 02:00:50 +0000 Subject: Association validation does not belong in a before_save callback: move it into a validation method. Restores the expected model.valid? == model.save. Add tests for cancelling save by returning false from a before_save callback. Remove assumption that before_destroy's return value indicates whether the record was destroyed. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2434 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/base.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'activerecord/lib/active_record/base.rb') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index e8b92da941..0e1c28e330 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1206,7 +1206,6 @@ module ActiveRecord #:nodoc: private def create_or_update if new_record? then create else update end - true end # Updates the associated record with values matching those of the instant attributes. -- cgit v1.2.3