Bring app in line with Hanami 2.1.0 base
This commit is contained in:
19
app/relations/webmentions.rb
Normal file
19
app/relations/webmentions.rb
Normal file
@@ -0,0 +1,19 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Adamantium
|
||||
module Relations
|
||||
class Webmentions < ROM::Relation[:sql]
|
||||
schema :webmentions, infer: true do
|
||||
associations do
|
||||
belongs_to :post
|
||||
end
|
||||
end
|
||||
|
||||
auto_struct(true)
|
||||
|
||||
def published
|
||||
where(self[:published_at] <= Time.now)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user