Refactor app in to its own slice

This commit is contained in:
2024-02-17 10:40:36 +11:00
parent b809b132d3
commit a6078f882e
161 changed files with 16176 additions and 193 deletions

View File

@@ -0,0 +1,19 @@
module Main
module Repos
class PageRepo < Adamantium::Repo[:pages]
def fetch!(slug:)
pages
.published
.where(slug: slug).one!
end
def for_main_nav
pages
.select(:name, :slug, :light_colour, :dark_colour, :published_at)
.published
.where(main_menu: true)
.to_a
end
end
end
end