diff options
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 9e3c54c7d4..8c1f615a37 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1305,7 +1305,7 @@ module ActiveRecord #:nodoc: # Attempts to save the record, but instead of just returning false if it couldn't happen, it raises a # RecordNotSaved exception def save! - raise RecordNotSaved unless save + save || raise(RecordNotSaved) end # Deletes the record in the database and freezes this instance to reflect that no changes should |