diff options
author | Alessandro Desantis <desa.alessandro@gmail.com> | 2020-09-27 11:01:11 +0200 |
---|---|---|
committer | Alessandro Desantis <desa.alessandro@gmail.com> | 2020-09-27 14:41:30 +0200 |
commit | 67abf8e6bda0b29eaa891c4f0e09c7ea811ce668 (patch) | |
tree | 898665399d8481609d5047c02e86bec9dc0ad69f /app/models/solidus_subscriptions/line_item.rb | |
parent | e30a0fb2dea090f4e30b07c9fcfd5c10d8c86164 (diff) |
Implement a `LineItem#subscribable` association
Diffstat (limited to 'app/models/solidus_subscriptions/line_item.rb')
-rw-r--r-- | app/models/solidus_subscriptions/line_item.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/solidus_subscriptions/line_item.rb b/app/models/solidus_subscriptions/line_item.rb index 46b0a0e..0acdc02 100644 --- a/app/models/solidus_subscriptions/line_item.rb +++ b/app/models/solidus_subscriptions/line_item.rb @@ -33,6 +33,7 @@ module SolidusSubscriptions inverse_of: :line_items, optional: true ) + belongs_to :subscribable, class_name: "::#{SolidusSubscriptions.configuration.subscribable_class}" validates :subscribable_id, presence: true validates :quantity, numericality: { greater_than: 0 } |