From 2aeebfe64569df0bae8e521895ca522f3d3b0a8f Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 8 Oct 2015 16:23:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=95=B0=E7=BB=84=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=20=E6=9C=89=E5=BA=8F=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index fc19836ce..5dd23b54c 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -112,8 +112,8 @@ class UsersController < ApplicationController case params[:type] when nil @message_alls = [] - system_message_types = MessageAll.where("message_type =?", "SystemMessage") - messages = MessageAll.where("user_id =? and message_type !=?" ,@user, "SystemMessage") + system_message_types = MessageAll.where("message_type =?", "SystemMessage").order("created_at desc") + messages = MessageAll.where("user_id =? and message_type !=?" ,@user, "SystemMessage").order("created_at desc") messages.each do |message_all| @message_alls << message_all.message end