Prøv find_by_sql
:
Post.find_by_sql(["SELECT title FROM posts WHERE author = ? AND created > ?", author_id, start_date])
[#<Post:0x36bff9c @attributes={"title"=>"The Cheap Man Buys Twice"}>, ...]
Prøv find_by_sql
:
Post.find_by_sql(["SELECT title FROM posts WHERE author = ? AND created > ?", author_id, start_date])
[#<Post:0x36bff9c @attributes={"title"=>"The Cheap Man Buys Twice"}>, ...]