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:
parent
1987cbd17c
commit
50dce5dea4
1 changed files with 7 additions and 1 deletions
|
@ -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é*
|
||||
|
||||
|
|
Loading…
Reference in a new issue