Sha256: 9dd5dd362ccde103ba52b1a70df423a92d0b591523c7461fb4622aac0da8a4be
Contents?: true
Size: 469 Bytes
Versions: 4
Compression:
Stored size: 469 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
4 entries across 4 versions & 1 rubygems