mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
[guides] Added newer find_by syntax example in 4.2 release notes for Adequate Record [skip ci]
This commit is contained in:
parent
5868307b74
commit
73a45f5ccd
1 changed files with 3 additions and 0 deletions
|
@ -92,6 +92,9 @@ Post.find(2) # Subsequent calls reuse the cached prepared statement
|
|||
Post.find_by_title('first post')
|
||||
Post.find_by_title('second post')
|
||||
|
||||
Post.find_by(title: 'first post')
|
||||
Post.find_by(title: 'second post')
|
||||
|
||||
post.comments
|
||||
post.comments(true)
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue