From e53f500e370a166e0cfdefba18f15e68192c9c41 Mon Sep 17 00:00:00 2001 From: Trevor Vallender Date: Fri, 29 Sep 2023 16:11:52 +0100 Subject: [PATCH] Set micropost sort order --- app/controllers/microposts_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/microposts_controller.rb b/app/controllers/microposts_controller.rb index 10283da..6b5ad96 100644 --- a/app/controllers/microposts_controller.rb +++ b/app/controllers/microposts_controller.rb @@ -5,7 +5,7 @@ class MicropostsController < ApplicationController before_action :set_micropost, only: [:show] def index - @microposts = Micropost.all + @microposts = Micropost.all.order(created_at: :desc) end def new