Permalink
Browse files

remove intermediate variable

  • Loading branch information...
1 parent 89f0957 commit 0c28247db19f2af9cb71e74f6824715e72f11076 @tenderlove tenderlove committed Aug 27, 2013
Showing with 1 addition and 3 deletions.
  1. +1 −3 activerecord/lib/active_record/associations/preloader/through_association.rb
@@ -32,12 +32,10 @@ def through_records_by_owner
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

0 comments on commit 0c28247

Please sign in to comment.