lib/pay/attributes.rb in pay-6.5.0 vs lib/pay/attributes.rb in pay-6.6.0
- old
+ new
@@ -16,9 +16,11 @@
has_many :charges, through: :pay_customers, class_name: "Pay::Charge"
has_many :subscriptions, through: :pay_customers, class_name: "Pay::Subscription"
has_one :payment_processor, -> { where(default: true, deleted_at: nil) }, class_name: "Pay::Customer", as: :owner, inverse_of: :owner
after_commit :cancel_active_pay_subscriptions!, on: [:destroy]
+
+ Pay::Stripe.model_names << name if Pay::Stripe.enabled?
end
# Changes a user's payment processor
#
# This has several effects: