The reflection built by the has_many_polymorphs
method.
Inherits from ActiveRecord::Reflection::AssociationReflection.
Stub out the validity check. Has_many_polymorphs checks validity on macro creation, not on reflection.
# File lib/has_many_polymorphs/reflection.rb, line 38 def check_validity! # nothing end
Set the classname of the target. Uses the join class name.
# File lib/has_many_polymorphs/reflection.rb, line 50 def class_name # normally is the classname of the association target @class_name ||= options[:join_class_name] end
Return the source reflection.
# File lib/has_many_polymorphs/reflection.rb, line 43 def source_reflection # normally is the has_many to the through model, but we return ourselves, # since there isn't a real source class for a polymorphic target self end