diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-09-18 12:29:44 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-09-18 12:29:44 +0900 |
commit | 8cde75813d54b92a894fb47d296929e8a6d26ba1 (patch) | |
tree | 10d0a161780634c11840cfb5e478fc27f6324ef0 /activerecord/lib/active_record/associations | |
parent | dae16f8cd5908a0accfaf280d89b47b757c4bf2d (diff) | |
download | rails-8cde75813d54b92a894fb47d296929e8a6d26ba1.tar.gz rails-8cde75813d54b92a894fb47d296929e8a6d26ba1.tar.bz2 rails-8cde75813d54b92a894fb47d296929e8a6d26ba1.zip |
Remove unused delegation to `reflection.options` in `Preloader::Association`
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r-- | activerecord/lib/active_record/associations/preloader/association.rb | 4 | ||||
-rw-r--r-- | activerecord/lib/active_record/associations/preloader/through_association.rb | 1 |
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] |