Watch the whitespace
I have been spending the last hour wondering why this doesnt work.
Post.find_by_sql["SELECT title FROM posts WHERE author = ? AND created > ?", author_id, start_date]
Its because it needed to be like this:
Post.find_by_sql ["SELECT title FROM posts WHERE author = ? AND created > ?", author_id, start_date]
yeah, you need that whitespace there.
No comments yet