Created
January 20, 2015 03:59
-
-
Save pdswan/65b0c7994751c0fc2d1e to your computer and use it in GitHub Desktop.
#to_sql or not #to_sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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