Merge pull request #38430 from indyarocks/active_record_querying_find_by_sql_improvement

Fix Active Record `find_by_sql` doc example [ci skip]
This commit is contained in:
Carlos Antonio da Silva 2020-02-11 09:18:44 -03:00 committed by GitHub
commit 39d3c9bcac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -36,7 +36,7 @@ module Querying
#
# # 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>:
#