Rails distance_of_time_in_words returns “en, about_x_hours”

后端 未结 3 1324
隐瞒了意图╮
隐瞒了意图╮ 2021-02-04 17:12

I\'m having a weird problem, hoping someone knows what the issue is...

Using distance_of_time_in_words (and consequently time_ago_in_words) is not returning the actual t

3条回答
  •  Happy的楠姐
    2021-02-04 17:57

    Shamelessly ripped off time_ago_in_words => "in {{count}} days."?

    Rails was using some deprecated syntax in the helper which then got dropped in the latest Ruby version. If you are using something like Heroku, try telling your production instance to use Rails 2.3.9. Otherwise you can also try downgrading Ruby.

    See the changelog: http://weblog.rubyonrails.org/2010/9/4/ruby-on-rails-2-3-9-released

    Changes i18n named-interpolation syntax from the deprecated Hello {{name}} to the 1.9-native Hello %{name}.
    

提交回复
热议问题