This commit is contained in:
albert
2011-07-09 03:32:18 -04:00
parent 085995126c
commit a16dfdf0dd
14 changed files with 75 additions and 48 deletions

View File

@@ -16,7 +16,7 @@ class ForumPostsController < ApplicationController
def index
@search = ForumPost.search(params[:search])
@forum_posts = @search.paginate(:page => params[:page], :order => "id DESC")
@forum_posts = @search.paginate(params[:page])
respond_with(@forum_posts)
end

View File

@@ -18,13 +18,13 @@ class ForumTopicsController < ApplicationController
def index
@search = ForumTopic.search(params[:search])
@forum_topics = @search.paginate(:page => params[:page], :order => "is_sticky DESC, updated_at DESC")
@forum_topics = @search.paginate(params[:page]).order("is_sticky DESC, updated_at DESC")
respond_with(@forum_topics)
end
def show
@forum_topic = ForumTopic.find(params[:id])
@forum_posts = ForumPost.search(:topic_id_eq => @forum_topic.id).paginate(:page => params[:page])
@forum_posts = ForumPost.search(:topic_id_eq => @forum_topic.id).paginate(params[:page])
respond_with(@forum_topic)
end

View File

@@ -4,7 +4,7 @@ class NoteVersionsController < ApplicationController
def index
@search = NoteVersion.search(params[:search])
@note_versions = @search.paginate(:page => params[:page])
@note_versions = @search.paginate(params[:page])
respond_with(@note_versions)
end
end

View File

@@ -16,7 +16,7 @@ class WikiPagesController < ApplicationController
def index
@search = WikiPage.search(params[:search])
@wiki_pages = @search.paginate(:page => params[:page])
@wiki_pages = @search.paginate(params[:page])
respond_with(@wiki_pages) do |format|
format.html do
if @wiki_pages.count == 1