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

Correct changelog for #42423 to be class method instead of instance

Also added an example [ci skip]
This commit is contained in:
Zachary Scott 2021-06-10 21:06:59 +09:00
parent 1987cbd17c
commit 50dce5dea4

View file

@ -1,4 +1,10 @@
* Add `ActiveRecord::Base#update!` that works like `ActiveRecord::Base#update` but raises exceptions.
* Add `ActiveRecord::Base.update!` that works like `ActiveRecord::Base.update` but raises exceptions.
This allows for the same behavior as the instance method `#update!` at a class level.
```ruby
Person.update!(:all, state: "confirmed")
```
*Dorian Marié*