time_ago_in_words => “in {{count}} days.”?

前端 未结 4 991
青春惊慌失措
青春惊慌失措 2021-02-20 12:13

I\'m having a very weird bug. In my code I have <%= time_ago_in_words(game.created_at) %>

It\'s works locally and on my staging server but NOT on my p

4条回答
  •  天涯浪人
    2021-02-20 12:32

    I had the same problem after recently adding the i18n gem. I'm on a project where upgrading Rails isn't currently a viable option. After reading through this post and nearly ripping out time_ago_in_words, I found several similar posts.

    Copying http://gist.github.com/rails/rails/blob/master/actionpack/lib/action_view/locale/en.yml into my config/locales/en.yml as suggested here: time_ago_in_words issue worked great. Just be aware that yml is very finicky about white space.

提交回复
热议问题