Replies: 3 comments 1 reply
-
Do you have a more thorough example? You can pass a plan to the |
Beta Was this translation helpful? Give feedback.
-
Oops, I forgot Discussions were a thing on GitHub. I saw that but if I just wanted to grab their subscription, I would have to go through each plan and check if a subscription exists for that plan. This causes a load of extra database queries. An example would be checking if an account has a subscription, to give them access to a feature |
Beta Was this translation helpful? Give feedback.
-
Thoughts on this @excid3? Or could you share how you check a user has a subscription, without checking every plan? It's one of the stoppers of me moving to Pay tbh as my current billing code makes this much simpler |
Beta Was this translation helpful? Give feedback.
-
If you have a number of different plans, it can be hard to grab the subscription for a customer.
You can't just do
@user.payment_processor.subscription
to grab that user's subscription, as it checks by the name.In the billing code I currently use in one of my apps, which I'm hoping to migrate to Pay, I have a
default
boolean and then in the account model it's just a has_one association.Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions