aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-08-27 15:22:26 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-08-27 15:22:26 -0700
commit0c28247db19f2af9cb71e74f6824715e72f11076 (patch)
tree5bbf4e96cc7b2f3a127e8bf51f64510bf45eedff /activerecord/lib/active_record
parent89f0957a6c5c1f9de934bda73b5fe6d294e3bb6e (diff)
downloadrails-0c28247db19f2af9cb71e74f6824715e72f11076.tar.gz
rails-0c28247db19f2af9cb71e74f6824715e72f11076.tar.bz2
rails-0c28247db19f2af9cb71e74f6824715e72f11076.zip
remove intermediate variable
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/associations/preloader/through_association.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations/preloader/through_association.rb b/activerecord/lib/active_record/associations/preloader/through_association.rb
index d35ffafe97..2c625cec04 100644
--- a/activerecord/lib/active_record/associations/preloader/through_association.rb
+++ b/activerecord/lib/active_record/associations/preloader/through_association.rb
@@ -32,12 +32,10 @@ module ActiveRecord
owners.each_with_object({}) do |owner, h|
association = owner.association through_reflection.name
- through_records = Array(association.reader)
+ h[owner] = Array(association.reader)
# Dont cache the association - we would only be caching a subset
association.reset if should_reset
-
- h[owner] = through_records
end
end