Skip to content

Commit 249876b

Browse files
Use a space after the comment sign when showing the result of commands
http://guides.rubyonrails.org/api_documentation_guidelines.html#example-code [ci skip]
1 parent 507812f commit 249876b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

activerecord/lib/active_record/reflection.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ class ThroughReflection < AssociationReflection #:nodoc:
409409
# tags_reflection = Post.reflect_on_association(:tags)
410410
#
411411
# 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">
413413
#
414414
def source_reflection
415415
@source_reflection ||= source_reflection_names.collect { |name| through_reflection.klass.reflect_on_association(name) }.compact.first
@@ -444,8 +444,8 @@ def through_reflection
444444
#
445445
# tags_reflection = Post.reflect_on_association(:tags)
446446
# 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>]
449449
#
450450
def chain
451451
@chain ||= begin
@@ -526,7 +526,7 @@ def association_primary_key(klass = nil)
526526
#
527527
# tags_reflection = Post.reflect_on_association(:tags)
528528
# tags_reflection.source_reflection_names
529-
# #=> [:tag, :tags]
529+
# # => [:tag, :tags]
530530
#
531531
def source_reflection_names
532532
@source_reflection_names ||= (options[:source] ? [options[:source]] : [name.to_s.singularize, name]).collect { |n| n.to_sym }

0 commit comments

Comments
 (0)