method

append_constraints

Importance_0
v8.1.1 - Show latest stable - 0 notes - Class: JoinAssociation
append_constraints(join, constraints) private

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/join_dependency/join_association.rb, line 92
          def append_constraints(join, constraints)
            if join.is_a?(Arel::Nodes::StringJoin)
              join_string = Arel::Nodes::And.new(constraints.unshift join.left)
              join.left = join_string
            else
              right = join.right
              right.expr = Arel::Nodes::And.new(constraints.unshift right.expr)
            end
          end
Register or log in to add new notes.