aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-09-18 12:29:44 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-09-18 12:29:44 +0900
commit8cde75813d54b92a894fb47d296929e8a6d26ba1 (patch)
tree10d0a161780634c11840cfb5e478fc27f6324ef0 /activerecord
parentdae16f8cd5908a0accfaf280d89b47b757c4bf2d (diff)
downloadrails-8cde75813d54b92a894fb47d296929e8a6d26ba1.tar.gz
rails-8cde75813d54b92a894fb47d296929e8a6d26ba1.tar.bz2
rails-8cde75813d54b92a894fb47d296929e8a6d26ba1.zip
Remove unused delegation to `reflection.options` in `Preloader::Association`
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/associations/preloader/association.rb4
-rw-r--r--activerecord/lib/active_record/associations/preloader/through_association.rb1
2 files changed, 1 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/associations/preloader/association.rb b/activerecord/lib/active_record/associations/preloader/association.rb
index 8101c5604b..fe696e0d6e 100644
--- a/activerecord/lib/active_record/associations/preloader/association.rb
+++ b/activerecord/lib/active_record/associations/preloader/association.rb
@@ -23,10 +23,6 @@ module ActiveRecord
end
private
- def options
- reflection.options
- end
-
# The name of the key on the associated records
def association_key_name
reflection.join_primary_key(klass)
diff --git a/activerecord/lib/active_record/associations/preloader/through_association.rb b/activerecord/lib/active_record/associations/preloader/through_association.rb
index 53e9c14823..fa32cc5553 100644
--- a/activerecord/lib/active_record/associations/preloader/through_association.rb
+++ b/activerecord/lib/active_record/associations/preloader/through_association.rb
@@ -80,6 +80,7 @@ module ActiveRecord
def through_scope
scope = through_reflection.klass.unscoped
+ options = reflection.options
if options[:source_type]
scope.where! reflection.foreign_type => options[:source_type]