Get yesterday's date

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:

I've created the following within my helper methods:

def Helper.get_date'%Y-%m-%d') /

But it doesn’t like the / or – or – 86400 (seconds).



Would be a non rails-specific way.

You can use some of the methods in ActiveSupport (which will be included if you're in a Rails app) to do the following:


EDIT: As it's a standard date format, you could also reference the standard directly:


Need Your Help

SQL 2008 setting compatibility level

sql sql-server database sql-server-2008

When I try to add a data-base in SQL Server 2008 (Right clicking on Databases folder->New Database) the only compatibility options given to me in the options tab are 70, 80, and 90.

HTML cell containing css scrollbars — how can I get rid of the padding?

html css cellpadding

I have an HTML table, where each cell contains a large amount of data. I would like each cell to be individually scrollable (sort of like "panes"), so I created a CSS class that includes the