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 /lib/solidus_subscriptions/configuration.rb | |
parent | e30a0fb2dea090f4e30b07c9fcfd5c10d8c86164 (diff) |
Implement a `LineItem#subscribable` association
Diffstat (limited to 'lib/solidus_subscriptions/configuration.rb')
-rw-r--r-- | lib/solidus_subscriptions/configuration.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/solidus_subscriptions/configuration.rb b/lib/solidus_subscriptions/configuration.rb index 3ab5f82..d5dc80f 100644 --- a/lib/solidus_subscriptions/configuration.rb +++ b/lib/solidus_subscriptions/configuration.rb @@ -8,7 +8,7 @@ module SolidusSubscriptions :success_dispatcher_class, :failure_dispatcher_class, :payment_failed_dispatcher_class, :out_of_stock_dispatcher, :maximum_successive_skips, :reprocessing_interval, :minimum_cancellation_notice, :processing_queue, :subscription_line_item_attributes, - :subscription_attributes, + :subscription_attributes, :subscribable_class, ) def success_dispatcher_class @@ -68,5 +68,10 @@ module SolidusSubscriptions }, ] end + + def subscribable_class + @subscribable_class ||= 'Spree::Variant' + @subscribable_class.constantize + end end end |