module Polyamorous::JoinDependencyExtensions::ClassMethods

Public Instance Methods

walk_tree(associations, hash) click to toggle source

Prepended before ActiveRecord::Associations::JoinDependency#walk_tree.

Calls superclass method
# File lib/polyamorous/activerecord_5.0_ruby_2/join_dependency.rb, line 106
def walk_tree(associations, hash)
  if TreeNode === associations
    associations.add_to_tree(hash)
  else
    super(associations, hash)
  end
end
walk_tree_with_polymorphism(associations, hash) click to toggle source

Replaces ActiveRecord::Associations::JoinDependency#self.walk_tree

# File lib/polyamorous/activerecord_4.2_ruby_1.9/join_dependency.rb, line 64
def walk_tree_with_polymorphism(associations, hash)
  if TreeNode === associations
    associations.add_to_tree(hash)
  else
    walk_tree_without_polymorphism(associations, hash)
  end
end