1
0
Fork 0
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:
Gordon Chan 2015-01-05 11:53:40 +13:00
parent 5868307b74
commit 73a45f5ccd

View file

@ -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)
```