I’m trying to expire articles after a saved date has been reached, i.e.:
@articles = Article.where(:semiretirement => Date.today)
I know that that doesn’t work, but how would I write after instead of equals?
Cheers!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
How about:
This will find all articles whose
semiretirementdate is less than today’s date. I believe that would be what you would want in order to expire articles that have passed a given date.