|
@ -17,14 +17,11 @@ class Api::V1::BookmarksController < Api::BaseController |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
def cached_bookmarks |
|
|
def cached_bookmarks |
|
|
cache_collection( |
|
|
|
|
|
Status.reorder(nil).joins(:bookmarks).merge(results), |
|
|
|
|
|
Status |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
cache_collection(results.map(&:status), Status) |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
def results |
|
|
def results |
|
|
@_results ||= account_bookmarks.paginate_by_id( |
|
|
|
|
|
|
|
|
@_results ||= account_bookmarks.eager_load(:status).paginate_by_id( |
|
|
limit_param(DEFAULT_STATUSES_LIMIT), |
|
|
limit_param(DEFAULT_STATUSES_LIMIT), |
|
|
params_slice(:max_id, :since_id, :min_id) |
|
|
params_slice(:max_id, :since_id, :min_id) |
|
|
) |
|
|
) |
|
|