This commit is contained in:
Toks
2013-04-22 22:03:48 -04:00
parent 7c51a7daa8
commit 3ef06e555b
2 changed files with 11 additions and 2 deletions

View File

@@ -16,7 +16,11 @@ class ForumPostsController < ApplicationController
end
def index
@search = ForumPost.active.search(params[:search])
if CurrentUser.is_janitor?
@search = ForumPost.search(params[:search])
else
@search = ForumPost.active.search(params[:search])
end
@forum_posts = @search.order("forum_posts.id DESC").paginate(params[:page], :search_count => params[:search])
respond_with(@forum_posts) do |format|
format.xml do