Add editable pages

This commit is contained in:
2023-11-18 11:01:14 +11:00
parent 484259fab1
commit 53434423fd
25 changed files with 369 additions and 5 deletions

15
app/relations/pages.rb Normal file
View File

@@ -0,0 +1,15 @@
# frozen_string_literal: true
module Adamantium
module Relations
class Pages < ROM::Relation[:sql]
schema :pages, infer: true
auto_struct(true)
def published
where(self[:published_at] <= Time.now)
end
end
end
end