mirror of
https://github.com/github/rails.git
synced 2026-01-30 00:38:00 -05:00
callbacks that return false should cause save to return false
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5226 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -1765,8 +1765,8 @@ module ActiveRecord #:nodoc:
|
||||
private
|
||||
def create_or_update
|
||||
raise ReadOnlyRecord if readonly?
|
||||
if new_record? then create else update end
|
||||
true
|
||||
result = new_record? ? create : update
|
||||
result != false
|
||||
end
|
||||
|
||||
# Updates the associated record with values matching those of the instance attributes.
|
||||
|
||||
Reference in New Issue
Block a user