radar/distance_of_time_in_words

Seeing vague:false in production but vague:true in dev

MSCAU opened this issue · 1 comments

MSCAU commented

Firstly, thanks for a great gem. It's quite handy.

I have a problem:

The code is ...

def time_ago_for_notification(n)
t("global.time_ago", time: time_ago_in_words(n.created_at, vague: true))
end

This runs as expected in dev but in production it's rendering as if vague were set to false.

My Gemfile correctly lists dotiw in the main section:

gem 'dotiw'

What else should I check to get this working properly?

MSCAU commented

I removed an old version of my users_helper.rb which was in the same folder and had a similar name and deployed again. Since it was present on both environments, it shouldn't have made a difference. However, the problem has gone and I now have vague:true behaviour on production too.