Skip to content
This repository
Browse code

Use a space after the comment sign when showing the result of commands

  • Loading branch information...
commit 249876b99bd518f93f5a9f8ae6c4ed7d6fb02936 1 parent 507812f
Carlos Antonio da Silva carlosantoniodasilva authored

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. +4 4 activerecord/lib/active_record/reflection.rb
8 activerecord/lib/active_record/reflection.rb
@@ -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 }

2 comments on commit 249876b

Neeraj Singh
Collaborator

@carlosantoniodasilva thank you. Will be mindful of it in future.

Carlos Antonio da Silva

@neerajdotname no problem, I usually don't remember about it either :smile:

Please sign in to comment.
Something went wrong with that request. Please try again.