diff options
author | David Gay <david@davidgay.org> | 2021-07-06 20:11:20 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-07-06 20:11:20 -0400 |
commit | 0ac5950f8c50bfcb6ce6cd89c0e80d982513cd15 (patch) | |
tree | 8d71642cb8fa11a62284d3f685bb6d126c32a4a6 /app/controllers | |
parent | de4cece0f141d883d62614dfe132a24a5e140eda (diff) |
Increase chat message area chat message limit from 100 to 200, and add a chat history page that shows the last 2,000 messages
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 |