So I converted my ERB to Slim and getting hit with linter issues. I'm getting
Rails/Date: Do not use
to_timeon Date objects, because they know nothing about the time zone
The code in question is actually:
=@product.updated_at.to_time.strftime('%B %e @ %l:%M %p')
The data itself is actually: 2018-11-16 12:40:20.12345. My thought was to just try using .zone.today. Which results in
undefined method `today' for "EDT":String
So I thought I'll use .current/.current.strftime('%B %e @ %l:%M %p') and it results in
undefined method `current' for both attempts
I went into my application.rb and made sure I had:
config.time_zone = 'Eastern Time (US & Canada)'
config.active_record.default_timezone = :local
What am I missing?