instance method
to_sql
Ruby on Rails 3.2.22.5
Since v3.1.12Signature
to_sql(arel, binds = [])
Converts an arel AST to SQL
Parameters
-
arelreq -
bindsopt = []
Source
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 5
def to_sql(arel, binds = [])
if arel.respond_to?(:ast)
visitor.accept(arel.ast) do
quote(*binds.shift.reverse)
end
else
arel
end
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb line 5
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::DatabaseStatements