diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-01-07 11:13:15 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-01-07 11:13:15 +0900 |
commit | a194c527fa7b16840fd1b1250dc9f624c6536546 (patch) | |
tree | 3ac66e20f096f5d2df61bd1dc238b765f5a1f09e /activerecord/lib | |
parent | 4f8d7024130411783d327cf978552135a2b62c30 (diff) | |
download | rails-a194c527fa7b16840fd1b1250dc9f624c6536546.tar.gz rails-a194c527fa7b16840fd1b1250dc9f624c6536546.tar.bz2 rails-a194c527fa7b16840fd1b1250dc9f624c6536546.zip |
Fix `pluck` with eager loading to respect `offset`
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation/finder_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index ff06ecbee1..b61e65cfb3 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -402,7 +402,7 @@ module ActiveRecord if using_limitable_reflections?(join_dependency.reflections) relation else - if relation.limit_value + if has_limit_or_offset? limited_ids = limited_ids_for(relation) limited_ids.empty? ? relation.none! : relation.where!(primary_key => limited_ids) end |