Avoid `unscope(:order)` when `limit_value` is presented for `count` #26972

Merged
merged 1 commit into from Nov 6, 2016

Projects

None yet

4 participants

@kamipo
Member
kamipo commented Nov 5, 2016

If limit_value is presented, records fetching order is very important
for performance. Should not unscope the order in the case.

@rails-bot

r? @rafaelfranca

(@rails-bot has picked a reviewer for you, use r? to override)

@rafaelfranca

Could you add a CHANGELOG entry?

@kamipo kamipo Avoid `unscope(:order)` when `limit_value` is presented for `count`
If `limit_value` is presented, records fetching order is very important
for performance. Should not unscope the order in the case.
62bb8b9
@kamipo
Member
kamipo commented Nov 5, 2016

I added a CHANGELOG entry!

@rafaelfranca rafaelfranca merged commit 2b2c096 into rails:master Nov 6, 2016

2 checks passed

codeclimate Code Climate didn't find any new or fixed issues.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@kamipo kamipo deleted the kamipo:avoid_unscope_order_when_limit_value_present branch Nov 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment