Skip to content

Instantly share code, notes, and snippets.

@pdswan
Created January 20, 2015 03:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pdswan/65b0c7994751c0fc2d1e to your computer and use it in GitHub Desktop.
Save pdswan/65b0c7994751c0fc2d1e to your computer and use it in GitHub Desktop.
#to_sql or not #to_sql
[14] pry(main)> left.arel.to_sql
=> "SELECT \"users\".* FROM \"users\" WHERE \"users\".\"name\" = $1"
[15] pry(main)> left.to_sql
=> "SELECT \"users\".* FROM \"users\" WHERE \"users\".\"name\" = 'Bill'"
[16] pry(main)>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment