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

@@ -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