个人博客按更新时间倒排

This commit is contained in:
ouyangxuhua 2016-01-21 16:15:45 +08:00
parent 600f5de32e
commit b6460633d2
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@ class BlogsController < ApplicationController
before_filter :find_blog,:except => [:index,:create,:new,:set_homepage, :cancel_homepage]
before_filter :find_user
def index
@articls = @user.blog.articles
@articls = @user.blog.articles.order("updated on desc")
@article = BlogComment.new
respond_to do |format|
format.html {render :layout=>'new_base_user'}