instance method
apply_join_dependency
Ruby on Rails 3.1.12
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 234
def apply_join_dependency(relation, join_dependency)
join_dependency.join_associations.each do |association|
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 234
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::FinderMethods