to_sql() public

Returns sql statement for the relation.

User.where(name: 'Oscar').to_sql
# SELECT "users".* FROM "users"  WHERE "users"."name" = 'Oscar'
Show source
Register or log in to add new notes.