diff options
author | Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp> | 2017-07-25 23:01:03 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-07-25 16:01:03 +0200 |
commit | a6ea7e282fc0cbb837cb1c1e344c31264600114c (patch) | |
tree | 60fd466602a437f1312d335090fcf89809295646 /app/controllers/api | |
parent | e5c0aa6493427b7251da558897877f8aa6ad8e4e (diff) |
Merge queries in Api::V1::FavouritesController (#4359)
Diffstat (limited to 'app/controllers/api')
-rw-r--r-- | app/controllers/api/v1/favourites_controller.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/api/v1/favourites_controller.rb b/app/controllers/api/v1/favourites_controller.rb index 92c0a62a9..9d73bb337 100644 --- a/app/controllers/api/v1/favourites_controller.rb +++ b/app/controllers/api/v1/favourites_controller.rb @@ -20,9 +20,7 @@ class Api::V1::FavouritesController < Api::BaseController def cached_favourites cache_collection( - Status.where( - id: results.map(&:status_id) - ), + Status.reorder(nil).joins(:favourites).merge(results), Status ) end |