From bfc79f55357f5890b6fa51516f5bdab45c3f9a1e Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 18 Jan 2011 17:45:14 -0600 Subject: [PATCH] fixed date time issues (next_day missing on heroku servers --- app/models/show.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/show.rb b/app/models/show.rb index 41c53d1..91e17de 100644 --- a/app/models/show.rb +++ b/app/models/show.rb @@ -15,11 +15,11 @@ class Show < ActiveRecord::Base class << self def next_show() - Show.where("showdate > ?", DateTime.now.next_day(-1)).order("showdate ASC").first + Show.where("showdate > ?", Date.today.yesterday).order("showdate ASC").first end def upcoming_shows() - Show.where("showdate > ?", DateTime.now.next_day(-1)).order("showdate ASC") + Show.where("showdate > ?", Date.today.yesterday).order("showdate ASC") end def past_shows()