aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2005-10-02 02:00:50 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2005-10-02 02:00:50 +0000
commite19bd169fac08052e7f0ae4ae4e5ac368629d31f (patch)
tree2d2bfafaa3f834440a144c8f175ac200b4f0e5f3 /activerecord/lib/active_record/base.rb
parentc6d8a1f975e1daad6bd4de029a964475d1777edc (diff)
downloadrails-e19bd169fac08052e7f0ae4ae4e5ac368629d31f.tar.gz
rails-e19bd169fac08052e7f0ae4ae4e5ac368629d31f.tar.bz2
rails-e19bd169fac08052e7f0ae4ae4e5ac368629d31f.zip
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
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-xactiverecord/lib/active_record/base.rb1
1 files changed, 0 insertions, 1 deletions
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.