lib/baby_squeel/join_dependency.rb
# Find the alias of a BabySqueel::Association, by passing
# a list (in order of chaining) of associations and finding
# the respective JoinAssociation at each level.
Find the alias of a BabySqueel::Association, by passing
a list (in order of chaining) of associations and finding
the respective JoinAssociation at each level.
Find the alias of a BabySqueel :: Association by passing a list ( in order of chaining ) of associations and finding the respective JoinAssociation at each level .
def find_alias(associations)
        if at_least?("5.2.3")
          join_dependency.send(:construct_tables!, join_dependency.send(:join_root))
        end
        join_association = find_join_association(associations)
        join_association.table
      end
def find_alias ( associations ) if at_least? ( "5.2.3" ) join_dependency . send ( :construct_tables! , join_dependency . send ( :join_root ) ) end join_association = find_join_association ( associations ) join_association . table end
Find the alias of a BabySqueel::Association, by passing
a list (in order of chaining) of associations and finding
the respective JoinAssociation at each level.
Find the alias of a BabySqueel :: Association by passing a list ( in order of chaining ) of associations and finding the respective JoinAssociation at each level .
# If we tell join_dependency to construct its tables, Active Record # handles building the correct aliases and attaching them to its # JoinDepenencies.
associations