instance method
subquery_for
Ruby on Rails 4.0.13
Since v4.0.13 Last seen in v5.2.8.1Signature
subquery_for(key, select)
Return a subquery for the given key using the join information.
Parameters
-
keyreq -
selectreq
Source
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 353
def subquery_for(key, select)
subselect = select.clone
subselect.projections = [key]
subselect
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb line 353
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::DatabaseStatements