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:
parent
6f3579a63e
commit
bf84303a62
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue