mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
fixes a missmatched column in example
This commit is contained in:
@@ -463,7 +463,7 @@ module ActiveRecord #:nodoc:
|
||||
#
|
||||
# # You can use the same string replacement techniques as you can with ActiveRecord#find
|
||||
# Post.find_by_sql ["SELECT title FROM posts WHERE author = ? AND created > ?", author_id, start_date]
|
||||
# > [#<Post:0x36bff9c @attributes={"first_name"=>"The Cheap Man Buys Twice"}>, ...]
|
||||
# > [#<Post:0x36bff9c @attributes={"title"=>"The Cheap Man Buys Twice"}>, ...]
|
||||
def find_by_sql(sql, binds = [])
|
||||
connection.select_all(sanitize_sql(sql), "#{name} Load", binds).collect! { |record| instantiate(record) }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user