From d373e5b22925cc8078628e22964d62ae9634e603 Mon Sep 17 00:00:00 2001 From: David Gay Date: Wed, 7 Jul 2021 22:32:07 -0400 Subject: Actually fix chat history --- CHANGELOG.md | 1 + app/controllers/chat_messages_controller.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7449037..3a20813 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file. ### Chat - Chat history reduced from 2,000 messages to 1,000 messages. +- Chat history fixed to actually show most recent messages. ## [0.1.13] - 2021-07-07 diff --git a/app/controllers/chat_messages_controller.rb b/app/controllers/chat_messages_controller.rb index adb73ce..b99e2c0 100644 --- a/app/controllers/chat_messages_controller.rb +++ b/app/controllers/chat_messages_controller.rb @@ -1,6 +1,6 @@ class ChatMessagesController < ApplicationController def index - @chat_messages = ChatMessage.order(created_at: :asc).limit(1_000).reverse + @chat_messages = ChatMessage.order(created_at: :desc).limit(1_000) end def list -- cgit v1.2.3