method
add_sti_conditions!
rails latest stable - Class:
ActiveRecord::Associations::ClassMethods
add_sti_conditions!(sql, reflections)private
No documentation available.
# File activerecord/lib/active_record/associations.rb, line 999
def add_sti_conditions!(sql, reflections)
sti_conditions = reflections.collect do |reflection|
reflection.klass.send(:type_condition) unless reflection.klass.descends_from_active_record?
end.compact
unless sti_conditions.empty?
sql << condition_word(sql) + sti_conditions.join(" AND ")
end
end