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:
parent
6bf6957137
commit
5573b21484
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue