Permalink
Browse files

fixes a missmatched column in example

  • Loading branch information...
1 parent b4b7171 commit 3b7cf234179a3ce09f4a7a9412c15fd82cf1e71c @mjy mjy committed Mar 3, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

0 comments on commit 3b7cf23

Please sign in to comment.