Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Article query by tag should sort by id DESC

  • Loading branch information...
commit 5dd5b10e95ca369a1ca7587677749bbef2e73576 1 parent 8abce4b
@reyesyang authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.