This may be an obvious question but im new to ruby and I’ve spent ages trying to get yesterdays date for a cucumber test that checks a url that includes yesterday’s date. for example:
http://www.blah.co.uk/blah/blah/schedule/2011-11-28
I’ve created the following within my helper methods:
def Helper.get_date
Time.now.strftime('%Y-%m-%d') / 1.day
end
But it doesn’t like the /1.day or – 1.day or – 86400 (seconds).
Would be a non rails-specific way.