mirror of
https://github.com/drapergem/draper
synced 2023-03-27 23:21:17 -04:00
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 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue