instance method
apply_join_dependency
Ruby on Rails 3.0.20
Since v3.0.20Signature
apply_join_dependency(relation, join_dependency)
No documentation comment.
Parameters
-
relationreq -
join_dependencyreq
Source
# File activerecord/lib/active_record/relation/finder_methods.rb, line 217
def apply_join_dependency(relation, join_dependency)
for association in join_dependency.join_associations
relation = association.join_relation(relation)
end
limitable_reflections = using_limitable_reflections?(join_dependency.reflections)
if !limitable_reflections && relation.limit_value
limited_id_condition = construct_limited_ids_condition(relation.except(:select))
relation = relation.where(limited_id_condition)
end
relation = relation.except(:limit, :offset) unless limitable_reflections
relation
end
Defined in activerecord/lib/active_record/relation/finder_methods.rb line 217
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::FinderMethods