From 79df95d9dabde1343b17e77785b8653793f56ee1 Mon Sep 17 00:00:00 2001 From: Aidan Cornelius-Bell Date: Mon, 23 Sep 2024 12:01:48 +0930 Subject: [PATCH] sorting consistency --- app/controllers/pubview_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/pubview_controller.rb b/app/controllers/pubview_controller.rb index 0d955fa..5ebcffd 100644 --- a/app/controllers/pubview_controller.rb +++ b/app/controllers/pubview_controller.rb @@ -12,7 +12,7 @@ class PubviewController < ApplicationController end def show_public - @pages = Page.where(visibility: :visible).order(created_at: :asc).limit(2) + @pages = Page.where(visibility: :visible).order('title ASC').limit(2) if current_user&.admin? @page = Page.find_by(slug: params[:slug], visibility: ['visible', 'user_only', 'admin_only']) -- 2.39.5