ruby on rails - How should I check if an expiry date has expired? -


for example, want current_user.subscribed changed false if current_user.expiry_date of date before date.today.

i don't know implement this. controller or action should link (if should @ all?). there way have automatically happen?

try this:

subscribed = date.today < current_user.expiry_date 

it return false if user date expiry.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -