diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-01-30 12:08:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-30 12:08:31 -0500 |
commit | de2bca4e8513d59c1a4f131e6fc6386231db1f82 (patch) | |
tree | 596397c5a8d22f5af572c0de7a5c581da4d44548 /activerecord | |
parent | eda7f26b7265d6de2b5fba718a93fd78a735b6b5 (diff) | |
parent | 5573b2148469abc730a041a0e06c1afc68a2c5ca (diff) | |
download | rails-de2bca4e8513d59c1a4f131e6fc6386231db1f82.tar.gz rails-de2bca4e8513d59c1a4f131e6fc6386231db1f82.tar.bz2 rails-de2bca4e8513d59c1a4f131e6fc6386231db1f82.zip |
Merge pull request #27847 from jaredbeck/patch-6
Docs: Specify return value of `save!`
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/persistence.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index 4cd867faae..7ceb7d1a55 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -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 |