fix for comment listing

This commit is contained in:
albert
2013-02-19 12:47:00 -05:00
parent 763b792126
commit a63816f78c
3 changed files with 5 additions and 5 deletions

View File

@@ -63,14 +63,14 @@ private
end
def index_by_post
@posts = Post.commented_before(Time.now).tag_match(params[:tags]).paginate(params[:page], :limit => 5)
@posts = Post.commented_before(Time.now).tag_match(params[:tags]).order("posts.id desc").paginate(params[:page], :limit => 5)
respond_with(@posts) do |format|
format.html {render :action => "index_by_post"}
end
end
def index_by_comment
@comments = Comment.search(params[:search]).paginate(params[:page])
@comments = Comment.search(params[:search]).order("comments.id desc").paginate(params[:page])
respond_with(@comments) do |format|
format.html {render :action => "index_by_comment"}
end