mirror of
https://github.com/usetrmnl/terminus.git
synced 2026-08-13 14:29:27 -07:00
Added extension exchange relation
Necessary to provide low level database access to extension exchanges. Issue: 261 Milestone: minor
This commit is contained in:
@@ -10,6 +10,7 @@ module Terminus
|
||||
has_many :devices, through: :extension_device, relation: :device, as: :devices
|
||||
has_many :extension_models, relation: :extension_model
|
||||
has_many :models, through: :extension_model, relation: :model, as: :models
|
||||
has_many :extension_exchanges, relation: :extension_exchange
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Terminus
|
||||
module Relations
|
||||
# The extension exchange relation.
|
||||
class ExtensionExchange < DB::Relation
|
||||
schema :extension_exchange, infer: true do
|
||||
associations { belongs_to :extension, relation: :extension }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user