Fix the build.

My decorator was silly. When UTC's today is different
than today's today, the decorator would be wrong. Now
we make sure to convert both to utc before making
the comparison
This commit is contained in:
Steve Klabnik 2012-11-02 19:19:39 -07:00
parent 6f3579a63e
commit bf84303a62
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
class PostDecorator < Draper::Decorator
def posted_date
if created_at.to_date == Date.today
if created_at.to_date == DateTime.now.utc.to_date
"Today"
else
"Not Today"