mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix AR Changelog examples and improve syntax highlight [ci skip]
This commit is contained in:
parent
11673a7977
commit
6cad0e317b
1 changed files with 12 additions and 12 deletions
|
@ -2,28 +2,28 @@
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
class User < ActiveRecord::Base
|
class User < ActiveRecord::Base
|
||||||
to_param :name
|
to_param :name
|
||||||
end
|
end
|
||||||
|
|
||||||
user = User.find_by(name: 'Fancy Pants')
|
user = User.find_by(name: 'Fancy Pants')
|
||||||
user.id # => 123
|
user.id # => 123
|
||||||
user.to_param # => "123-fancy-pants"
|
user.to_param # => "123-fancy-pants"
|
||||||
|
|
||||||
*Javan Makhmali*
|
*Javan Makhmali*
|
||||||
|
|
||||||
* Added `ActiveRecord::Base.no_touching`, which allows ignoring touch on models.
|
* Added `ActiveRecord::Base.no_touching`, which allows ignoring touch on models.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
|
|
||||||
Post.no_touching do
|
Post.no_touching do
|
||||||
Post.first.touch
|
Post.first.touch
|
||||||
end
|
end
|
||||||
|
|
||||||
*Sam Stephenson*, *Damien Mathieu*
|
*Sam Stephenson*, *Damien Mathieu*
|
||||||
|
|
||||||
* Prevent the counter cache from being decremented twice when destroying
|
* Prevent the counter cache from being decremented twice when destroying
|
||||||
a record on a has_many :through association.
|
a record on a `has_many :through` association.
|
||||||
|
|
||||||
Fixes #11079.
|
Fixes #11079.
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
*Adam Williams*, *Yves Senn*
|
*Adam Williams*, *Yves Senn*
|
||||||
|
|
||||||
* Fix bug where has_one associaton record update result in crash, when replaced with itself.
|
* Fix bug where `has_one` associaton record update result in crash, when replaced with itself.
|
||||||
|
|
||||||
Fixes #12834.
|
Fixes #12834.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue