Flowdock
find_by_sql(sql) public

Works like find(:all), but requires a complete SQL string. Examples:

  Post.find_by_sql "SELECT p.*, c.author FROM posts p, comments c WHERE p.id = c.post_id"
  Post.find_by_sql ["SELECT * FROM posts WHERE author = ? AND created > ?", author_id, start_date]
Show source
Register or log in to add new notes.