Flowdock
method

get_chain

Importance_0
v5.0.0.1 - Show latest stable - 0 notes - Class: AssociationScope
get_chain(reflection, association, tracker) 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/association_scope.rb, line 108
      def get_chain(reflection, association, tracker)
        name = reflection.name
        runtime_reflection = Reflection::RuntimeReflection.new(reflection, association)
        previous_reflection = runtime_reflection
        reflection.chain.drop(1).each do |refl|
          alias_name = tracker.aliased_table_for(refl.table_name, refl.alias_candidate(name))
          proxy = ReflectionProxy.new(refl, alias_name)
          previous_reflection.next = proxy
          previous_reflection = proxy
        end
        [runtime_reflection, previous_reflection]
      end
Register or log in to add new notes.