instance method
to_sql
Ruby on Rails edge
Since v3.1.12Signature
to_sql(arel_or_sql, binds = nil)
No documentation comment.
Parameters
-
arel_or_sqlreq -
bindsopt = nil
Source
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 11
def to_sql(arel_or_sql, binds = nil)
unless binds.nil?
ActiveRecord.deprecator.warn(<<~MSG)
Passing `binds` to `to_sql` is deprecated and will be removed in Rails 9.0.
The `binds` argument has been unused since bind parameters were moved into
the Arel AST in Rails 5.2.
MSG
end
sql, _ = to_sql_and_binds(arel_or_sql)
sql
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb line 11
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::DatabaseStatements