method

build_through_conditions

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

Method deprecated or moved

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

build_through_conditions()
protected

No documentation available.

# File activerecord/lib/active_record/associations/has_many_through_association.rb, line 235
        def build_through_conditions
          conditions = @reflection.through_reflection.options[:conditions]
          if conditions.is_a?(Hash)
            interpolate_sql(sanitize_sql(conditions)).gsub(
              @reflection.quoted_table_name,
              @reflection.through_reflection.quoted_table_name)
          elsif conditions
            interpolate_sql(sanitize_sql(conditions))
          end
        end