class ActiveRecord::Associations::AssociationScope::BindSubstitution - activerecord-4.2.3 Documentation

# class ActiveRecord::Associations::AssociationScope::BindSubstitution

### Public Class Methods

new(block) click to toggle source

    # File lib/active_record/associations/association_scope.rb, line 9
    def initialize(block)
      @block = block
    end

### Public Instance Methods

bind_value(scope, column, value, alias_tracker) click to toggle source

    # File lib/active_record/associations/association_scope.rb, line 13
    def bind_value(scope, column, value, alias_tracker)
      substitute = alias_tracker.connection.substitute_at(column)
      scope.bind_values += [[column, @block.call(value)]]
      substitute
    end