Sha256: 06bb4d836460b6d87552ad178c180dd168d5eafce0471b342569bce597a279f2
Contents?: true
Size: 487 Bytes
Versions: 1
Compression:
Stored size: 487 Bytes
Contents
# Spree::Users maintain a list of the subscriptions associated with them module Spree module Users module HaveManySubscritptions def self.prepended(base) base.has_many( :subscriptions, class_name: 'SolidusSubscriptions::Subscription', foreign_key: 'user_id' ) base.accepts_nested_attributes_for :subscriptions end end end end Spree.user_class.prepend(Spree::Users::HaveManySubscritptions)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
solidus_subscriptions-alpha-0.0.4 | app/decorators/spree/users/have_many_subscriptions.rb |