diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/chat_messages_controller.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/chat_messages_controller.rb b/app/controllers/chat_messages_controller.rb index 9112bb7..a299379 100644 --- a/app/controllers/chat_messages_controller.rb +++ b/app/controllers/chat_messages_controller.rb @@ -1,7 +1,10 @@ class ChatMessagesController < ApplicationController def index - # TODO: Let's rename this method to #list - @chat_messages = ChatMessage.order(created_at: :desc).limit(100).reverse + @chat_messages = ChatMessage.order(created_at: :desc).limit(2000) + end + + def list + @chat_messages = ChatMessage.order(created_at: :asc).limit(200) render partial: "chat_messages/list" end |