app/models/named_variable_date.rb
def sort_join_on_condition_for(child_table, parent, path)
      path_matches = child_table[:path].eq(path)

      type, id = parent.named_variable_date_join_tuple

      type_matches = child_table[:entity_type].eq(type)

      id_matches = child_table[:entity_id].eq(id)

      condition = arel_and_expressions path_matches, type_matches, id_matches

      Arel::Nodes::On.new condition
    end
# Build the `ON` condition for a sort join.
#
# @see ReferencesNamedVariableDates::ClassMethods#named_variable_date_join_tuple
# @param [Arel::Nodes::TableAlias] child_table
# @param [Class] association
# @param [String] path
# @return [Arel::Nodes::On]
Build the `ON` condition for a sort join.
Build the ` ON ` condition for a sort join .
def sort_join_on_condition_for(child_table, parent, path)
      path_matches = child_table[:path].eq(path)
      type, id = parent.named_variable_date_join_tuple
      type_matches = child_table[:entity_type].eq(type)
      id_matches = child_table[:entity_id].eq(id)
      condition = arel_and_expressions path_matches, type_matches, id_matches
      Arel::Nodes::On.new condition
    end
def sort_join_on_condition_for ( child_table , parent , path ) path_matches = child_table [ :path ] . eq ( path ) type , id = parent . named_variable_date_join_tuple type_matches = child_table [ :entity_type ] . eq ( type ) id_matches = child_table [ :entity_id ] . eq ( id ) condition = arel_and_expressions path_matches , type_matches , id_matches Arel :: Nodes :: On . new condition end
Build the `ON` condition for a sort join.
Build the ` ON ` condition for a sort join .
None
Arel::Nodes::On
child_table
parent
path
None
see
None