Merge queries in Api::V1::FavouritesController (#4359)
parent
9510179cc1
commit
98ba57efca
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue