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