Answer the question
In order to leave comments, you need to log in
How to organize a subscription in a rails project?
There is a service with configured devise and cancan. You need to make a premium subscription with a number of benefits for the user. How is it usually organized to check that the subscription has expired / is active?
The only option that comes to mind is checking all users on a schedule, which, it seems to me, is not very correct.
Answer the question
In order to leave comments, you need to log in
I would make the field "active until", per user.
And if this field is greater than the current time - the subscription is active.
When paying, we add time.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question