Flowdock
method

build_through_conditions

Importance_0
v3.0.9 - Show latest stable - 0 notes - Class: ActiveRecord::Associations::ThroughAssociationScope
build_through_conditions() protected

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# 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
Register or log in to add new notes.