method
build_through_conditions
rails latest stable - Class:
ActiveRecord::Associations::ThroughAssociationScope
build_through_conditions()protected
No documentation available.
# File activerecord/lib/active_record/associations/through_association_scope.rb, line 142
def build_through_conditions
conditions = @reflection.through_reflection.options[:conditions]
if conditions.is_a?(Hash)
interpolate_and_sanitize_sql(conditions, nil, @reflection.through_reflection.klass).gsub(
@reflection.quoted_table_name,
@reflection.through_reflection.quoted_table_name)
elsif conditions
interpolate_and_sanitize_sql(conditions)
end
end