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

[ci skip] ActiveRecord::Querying-find_by_sql-documentation-fix

This commit is contained in:
Chandan Jhunjhunwal 2020-02-11 17:22:34 +05:30
parent 5d7f151fcf
commit 09ddc083d8

View file

@ -36,7 +36,7 @@ module ActiveRecord
#
# # A simple SQL query spanning multiple tables
# Post.find_by_sql "SELECT p.title, c.author FROM posts p, comments c WHERE p.id = c.post_id"
# # => [#<Post:0x36bff9c @attributes={"title"=>"Ruby Meetup", "first_name"=>"Quentin"}>, ...]
# # => [#<Post:0x36bff9c @attributes={"title"=>"Ruby Meetup", "author"=>"Quentin"}>, ...]
#
# You can use the same string replacement techniques as you can with <tt>ActiveRecord::QueryMethods#where</tt>:
#