I'm using the following as part of an ActiveRecord find method:
:conditions => "created_at > date_sub(now(), INTERVAL 7 DAY)"
This works properly on my development server where I'm using MySQL, but I'm deploying to postgreSQL which doesn't have a date_sub function. Ignoring the fact that I'm using two different databases, does Rails have anything built in to abstract this date subtraction operation?
If not, is there a recommended construct in Rails for specifying two different SQL queries that should be run in the event of encountering different DBs?