This commit is contained in:
2023-01-10 11:39:21 +02:00
parent 68179949c8
commit 4e2c0c9687
6 changed files with 61 additions and 62 deletions

View File

@ -1,8 +1,12 @@
module Merged
module PagesHelper
def last_blog
def self.last_blog
blog = Page.where(type: :blog).order(updated_at: :asc).first
blog&.sections.last
return nil unless blog
blog.sections.last
end
def last_blog
self.class.last_blog
end
def header_list