In Ruby, I'm trying to do the following.
def self.stats(since)
return Events.find(:all, :select => 'count(*) as this_count', :conditions => ['Date(event_date) >= ?', (Time.now - since)]).first.this_count
end
where "since" is a string representing an amount of time ('1 hour', '1 day', '3 days') and so on. Any suggestions?