Add reactions to posts
This commit is contained in:
@@ -11,6 +11,8 @@ module Adamantium
|
||||
has_many :post_trips
|
||||
has_many :trips, through: :post_trips
|
||||
|
||||
has_many :reactions
|
||||
|
||||
has_many :webmentions
|
||||
end
|
||||
end
|
||||
|
15
app/relations/reactions.rb
Normal file
15
app/relations/reactions.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Adamantium
|
||||
module Relations
|
||||
class Reactions < ROM::Relation[:sql]
|
||||
schema :reactions, infer: true do
|
||||
associations do
|
||||
belongs_to :post
|
||||
end
|
||||
end
|
||||
|
||||
auto_struct(true)
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user