aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2013-05-09 02:06:03 -0400
committerNeeraj Singh <neerajdotname@gmail.com>2013-05-09 02:06:03 -0400
commitd9490631d2e5cf99d748541bd9c3c43adcdd6e6c (patch)
tree6bb71dfbc0927927df8b65f2311d5be8e90a5dc5 /activerecord
parent6abc3618369268015103121e980f7992b788bd89 (diff)
downloadrails-d9490631d2e5cf99d748541bd9c3c43adcdd6e6c.tar.gz
rails-d9490631d2e5cf99d748541bd9c3c43adcdd6e6c.tar.bz2
rails-d9490631d2e5cf99d748541bd9c3c43adcdd6e6c.zip
minor rdoc cleanup for reflection methods
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/reflection.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb
index 60eda96f08..d26fb14413 100644
--- a/activerecord/lib/active_record/reflection.rb
+++ b/activerecord/lib/active_record/reflection.rb
@@ -398,7 +398,7 @@ module ActiveRecord
delegate :foreign_key, :foreign_type, :association_foreign_key,
:active_record_primary_key, :type, :to => :source_reflection
- # Gets the source of the through reflection. It checks both a singularized
+ # Returns the source of the through reflection. It checks both a singularized
# and pluralized form for <tt>:belongs_to</tt> or <tt>:has_many</tt>.
#
# class Post < ActiveRecord::Base
@@ -412,8 +412,7 @@ module ActiveRecord
# end
#
# tags_reflection = Post.reflect_on_association(:tags)
- #
- # taggings_reflection = tags_reflection.source_reflection
+ # tags_reflection.source_reflection
# # => <ActiveRecord::Reflection::AssociationReflection: @macro=:belongs_to, @name=:tag, @active_record=Tagging, @plural_name="tags">
#
def source_reflection
@@ -429,7 +428,8 @@ module ActiveRecord
# end
#
# tags_reflection = Post.reflect_on_association(:tags)
- # taggings_reflection = tags_reflection.through_reflection
+ # tags_reflection.through_reflection
+ # # => <ActiveRecord::Reflection::AssociationReflection: @macro=:has_many, @name=:taggings, @active_record=Post, @plural_name="taggings">
#
def through_reflection
@through_reflection ||= active_record.reflect_on_association(options[:through])