Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixes a missmatched column in example

  • Loading branch information...
commit 045ca303947e7e9209cee4b3fdede05f6dbb02c4 1 parent d735672
@mjy mjy authored fxn committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  activerecord/lib/active_record/base.rb
View
2  activerecord/lib/active_record/base.rb
@@ -463,7 +463,7 @@ class << self # Class methods
#
# # 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
Please sign in to comment.
Something went wrong with that request. Please try again.