From e0537acaeb6c432db844ff835120de7aabb1e39b Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Mon, 13 Jun 2005 10:52:53 +0000 Subject: Added ActiveRecord::Recursion to guard against recursive calls to #save git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1411 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/validations.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/validations.rb') diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb index 3eedd0093c..d58502e98b 100755 --- a/activerecord/lib/active_record/validations.rb +++ b/activerecord/lib/active_record/validations.rb @@ -653,7 +653,7 @@ module ActiveRecord # Attempts to save the record just like Base.save but will raise a RecordInvalid exception instead of returning false # if the record is not valid. def save! - valid? ? save_without_validation : raise(RecordInvalid) + valid? ? save(false) : raise(RecordInvalid) end # Updates a single attribute and saves the record without going through the normal validation procedure. -- cgit v1.2.3