@@ -409,7 +409,7 @@ class ThroughReflection < AssociationReflection #:nodoc:
409
409
# tags_reflection = Post.reflect_on_association(:tags)
410
410
#
411
411
# taggings_reflection = tags_reflection.source_reflection
412
- # #=> <ActiveRecord::Reflection::AssociationReflection: @macro=:belongs_to, @name=:tag, @active_record=Tagging, @plural_name="tags">
412
+ # # => <ActiveRecord::Reflection::AssociationReflection: @macro=:belongs_to, @name=:tag, @active_record=Tagging, @plural_name="tags">
413
413
#
414
414
def source_reflection
415
415
@source_reflection ||= source_reflection_names . collect { |name | through_reflection . klass . reflect_on_association ( name ) } . compact . first
@@ -444,8 +444,8 @@ def through_reflection
444
444
#
445
445
# tags_reflection = Post.reflect_on_association(:tags)
446
446
# tags_reflection.chain
447
- # #=> [<ActiveRecord::Reflection::ThroughReflection: @macro=:has_many, @name=:tags, @options={:through=>:taggings}, @active_record=Post>,
448
- # <ActiveRecord::Reflection::AssociationReflection: @macro=:has_many, @name=:taggings, @options={}, @active_record=Post>]
447
+ # # => [<ActiveRecord::Reflection::ThroughReflection: @macro=:has_many, @name=:tags, @options={:through=>:taggings}, @active_record=Post>,
448
+ # <ActiveRecord::Reflection::AssociationReflection: @macro=:has_many, @name=:taggings, @options={}, @active_record=Post>]
449
449
#
450
450
def chain
451
451
@chain ||= begin
@@ -526,7 +526,7 @@ def association_primary_key(klass = nil)
526
526
#
527
527
# tags_reflection = Post.reflect_on_association(:tags)
528
528
# tags_reflection.source_reflection_names
529
- # #=> [:tag, :tags]
529
+ # # => [:tag, :tags]
530
530
#
531
531
def source_reflection_names
532
532
@source_reflection_names ||= ( options [ :source ] ? [ options [ :source ] ] : [ name . to_s . singularize , name ] ) . collect { |n | n . to_sym }
0 commit comments