fix ordering of git st
This commit is contained in:
@@ -34,7 +34,7 @@ class UserPresenter
|
|||||||
end
|
end
|
||||||
|
|
||||||
def posts_for_subscription(subscription)
|
def posts_for_subscription(subscription)
|
||||||
Post.where("id in (?)", subscription.post_id_array.slice(0, 6).map(&:to_i))
|
Post.where("id in (?)", subscription.post_id_array.slice(0, 6).map(&:to_i)).order("id desc")
|
||||||
end
|
end
|
||||||
|
|
||||||
def upload_limit
|
def upload_limit
|
||||||
@@ -72,7 +72,7 @@ class UserPresenter
|
|||||||
end
|
end
|
||||||
|
|
||||||
def favorites
|
def favorites
|
||||||
@favorites ||= user.favorites.limit(6).includes(:post).map(&:post)
|
@favorites ||= user.favorites.limit(6).includes(:post).reorder("favorites.id desc").map(&:post)
|
||||||
end
|
end
|
||||||
|
|
||||||
def has_favorites?
|
def has_favorites?
|
||||||
|
|||||||
Reference in New Issue
Block a user