fix ordering of forum posts in topics
This commit is contained in:
@@ -45,7 +45,7 @@ class ForumTopicsController < ApplicationController
|
||||
if request.format == Mime::HTML
|
||||
@forum_topic.mark_as_read!(CurrentUser.user)
|
||||
end
|
||||
@forum_posts = ForumPost.search(:topic_id => @forum_topic.id).order("forum_posts.id").paginate(params[:page])
|
||||
@forum_posts = ForumPost.search(:topic_id => @forum_topic.id).reorder("forum_posts.id").paginate(params[:page])
|
||||
respond_with(@forum_topic) do |format|
|
||||
format.atom do
|
||||
@forum_posts = @forum_posts.reverse_order.includes(:creator).load
|
||||
|
||||
@@ -13,7 +13,7 @@ class IpBansController < ApplicationController
|
||||
|
||||
def index
|
||||
@search = IpBan.search(params[:search])
|
||||
@ip_bans = @search.order("id desc").paginate(params[:page], :limit => params[:limit])
|
||||
@ip_bans = @search.paginate(params[:page], :limit => params[:limit])
|
||||
respond_with(@ip_bans)
|
||||
end
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class JanitorTrialsController < ApplicationController
|
||||
|
||||
def index
|
||||
@search = JanitorTrial.search(params[:search])
|
||||
@janitor_trials = @search.order("id desc").paginate(params[:page], :limit => params[:limit])
|
||||
@janitor_trials = @search.paginate(params[:page], :limit => params[:limit])
|
||||
respond_with(@janitor_trials)
|
||||
end
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class PoolsController < ApplicationController
|
||||
|
||||
def gallery
|
||||
limit = params[:limit] || CurrentUser.user.per_page
|
||||
@pools = Pool.series.search(params[:search]).order("updated_at desc").paginate(params[:page], :limit => limit, :search_count => params[:search])
|
||||
@pools = Pool.series.search(params[:search]).reorder("updated_at desc").paginate(params[:page], :limit => limit, :search_count => params[:search])
|
||||
@post_set = PostSets::PoolGallery.new(@pools)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user