diff options
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r-- | activerecord/lib/active_record/associations/association_collection.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index a59de18313..07b5b07195 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -553,9 +553,8 @@ module ActiveRecord if fetch_first_or_last_using_find?(args) scoped.send(type, *args) else - load_target unless loaded? args.shift if args.first.kind_of?(Hash) && args.first.empty? - @target.send(type, *args) + load_target.send(type, *args) end end end |