aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschneems <richard.schneeman@gmail.com>2015-10-26 14:20:27 -0500
committerschneems <richard.schneeman@gmail.com>2015-10-26 18:07:34 -0500
commitd81fbe22ed2e8f37e5bc4971fedf6ba9d3116655 (patch)
tree029194767e1cb8c153d63894723cc2dae3af0481
parent3a6872c49a6d332f68342742482d810322020be2 (diff)
downloadrails-d81fbe22ed2e8f37e5bc4971fedf6ba9d3116655.tar.gz
rails-d81fbe22ed2e8f37e5bc4971fedf6ba9d3116655.tar.bz2
rails-d81fbe22ed2e8f37e5bc4971fedf6ba9d3116655.zip
[ci skip] Clarify doc for preloaders_for_one
-rw-r--r--activerecord/lib/active_record/associations/preloader.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations/preloader.rb b/activerecord/lib/active_record/associations/preloader.rb
index c5387eb996..fae955f815 100644
--- a/activerecord/lib/active_record/associations/preloader.rb
+++ b/activerecord/lib/active_record/associations/preloader.rb
@@ -132,6 +132,11 @@ module ActiveRecord
}
end
+ # Loads all the given data into +records+ for a singular +association+.
+ #
+ # Functions by instantiating a preloader class such as Preloader::HasManyThrough and
+ # call the +run+ method for each passed in class in the +records+ argument.
+ #
# Not all records have the same class, so group then preload group on the reflection
# itself so that if various subclass share the same association then we do not split
# them unnecessarily