method

add_sti_conditions!

rails latest stable - Class: ActiveRecord::Associations::ClassMethods

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1.0.0) is shown here.

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