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:
commit
39d3c9bcac
@ -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>:
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user