From bdfc5d4c77e1c440e909c80518b6ca004c40ef19 Mon Sep 17 00:00:00 2001 From: Aidan Cornelius-Bell Date: Mon, 23 Sep 2024 11:59:05 +0930 Subject: [PATCH] order of pages shown --- app/controllers/pubview_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/pubview_controller.rb b/app/controllers/pubview_controller.rb index be512d5..3eabad2 100644 --- a/app/controllers/pubview_controller.rb +++ b/app/controllers/pubview_controller.rb @@ -1,6 +1,6 @@ class PubviewController < ApplicationController def index - @pages = Page.where(visibility: :visible).order(created_at: :asc).limit(2) + @pages = Page.where(visibility: :visible).order(created_at: :desc).limit(2) @per_page = 15 @page = params[:page].to_i || 1 @@ -66,4 +66,4 @@ class PubviewController < ApplicationController word_count = content.split.size (word_count / 200.0).ceil end -end \ No newline at end of file +end -- 2.39.5