From: Aidan Cornelius-Bell Date: Mon, 23 Sep 2024 02:31:48 +0000 (+0930) Subject: sorting consistency X-Git-Url: https://gitweb.mndrdr.org/?a=commitdiff_plain;h=79df95d9dabde1343b17e77785b8653793f56ee1;p=arelpe.git sorting consistency --- 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'])