class ActiveRecord::Reflection::ThroughReflection
def source_reflection
end
has_many :tags, :through => :taggings
has_many :taggings
class Post < ActiveRecord::Base
(The :tags association on Tagging below.)
Gets the source of the through reflection. It checks both a singularized and pluralized form for :belongs_to or :has_many.
:nodoc:
Holds all the meta-data about a :through association as it was specified in the Active Record class.
def source_reflection @source_reflection ||= source_reflection_names.collect { |name| through_reflection.klass.reflect_on_association(name) }.compact.first end