Skip to content
Browse files

Article query by tag should sort by id DESC

  • Loading branch information...
1 parent 8abce4b commit 5dd5b10e95ca369a1ca7587677749bbef2e73576 @reyesyang committed Jan 5, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/controllers/articles_controller.rb
View
2 app/controllers/articles_controller.rb
@@ -59,7 +59,7 @@ def tagging
tag = Tag.find_by_name! params[:tag]
raise ActiveRecord::RecordNotFound if tag.draft? && !current_user.try(:admin?)
- @articles = tag.articles.includes(:tags).paginate(page: params[:page])
+ @articles = tag.articles.order('id DESC').paginate(page: params[:page])
@page_title = "#{tag.name} 相关文章"
render :index
end

0 comments on commit 5dd5b10

Please sign in to comment.
Something went wrong with that request. Please try again.