diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-01-07 14:05:02 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-01-07 14:31:18 +0900 |
commit | f5328d9379da473bfc5420996693a14c6e0d2556 (patch) | |
tree | bfba992eca2f23b93760e248b6a19035dbef5780 /activestorage/db | |
parent | 68754d37706f11ca363b3108eda10749b9957817 (diff) | |
download | rails-f5328d9379da473bfc5420996693a14c6e0d2556.tar.gz rails-f5328d9379da473bfc5420996693a14c6e0d2556.tar.bz2 rails-f5328d9379da473bfc5420996693a14c6e0d2556.zip |
Make `find_nth_from_last` more performant when using reversible order
We can use `relation.last(index)[-index]` instead of loading all records
when using reversible order because `last` will call `reverse_order`.
Diffstat (limited to 'activestorage/db')
0 files changed, 0 insertions, 0 deletions