Flowdock
method

to_sql

Importance_1
Ruby on Rails latest stable (v4.0.2) - 0 notes - Class: ActiveRecord::Relation
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.