favorites: order /favorites.json by id.
Order https://danbooru.donmai.us/favorites.json by favorite ID instead of by post ID. This way you can get a feed of recently added favorites. Previously this wasn't possible because we didn't have an index on favorite ID.
This commit is contained in:
@@ -18,7 +18,7 @@ class Favorite < ApplicationRecord
|
||||
q = q.for_user(params[:user_id])
|
||||
end
|
||||
|
||||
q.order(post_id: :desc)
|
||||
q.apply_default_order(params)
|
||||
end
|
||||
|
||||
def self.available_includes
|
||||
|
||||
Reference in New Issue
Block a user