diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/chat_messages_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/chat_messages_controller.rb b/app/controllers/chat_messages_controller.rb index a299379..444def1 100644 --- a/app/controllers/chat_messages_controller.rb +++ b/app/controllers/chat_messages_controller.rb @@ -1,10 +1,10 @@ class ChatMessagesController < ApplicationController def index - @chat_messages = ChatMessage.order(created_at: :desc).limit(2000) + @chat_messages = ChatMessage.order(created_at: :asc).limit(2000).reverse end def list - @chat_messages = ChatMessage.order(created_at: :asc).limit(200) + @chat_messages = ChatMessage.order(created_at: :desc).limit(200).reverse render partial: "chat_messages/list" end |