instance method
subquery_for
Ruby on Rails 4.1.16
Since v4.0.13 Last seen in v5.2.8.1Signature
subquery_for(key, select)
Returns 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 347
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 347
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::DatabaseStatements