1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Docs: Specify return value of save!

I can never remember if it returns `self` or `true` (seems to be `true`)

[ci skip]
This commit is contained in:
Jared Beck 2017-01-30 11:49:24 -05:00 committed by GitHub
parent 6bf6957137
commit 5573b21484

View file

@ -148,6 +148,8 @@ module ActiveRecord
#
# Attributes marked as readonly are silently ignored if the record is
# being updated.
#
# Unless an error is raised, returns true.
def save!(*args)
create_or_update(*args) || raise(RecordNotSaved.new("Failed to save the record", self))
end