【发布时间】:2015-09-24 01:17:52
【问题描述】:
是否有与 time_ago_in_words 相反的 rails helper ?我似乎找不到相反的东西......从现在起我可以有 7 天的时间转换为“大约 1 周内”。
我可以让它为过去工作:
<%= time_ago_in_words( milestone.due_date) %>
但这对未来不起作用:
<%= time_ahead_in_words(milestone.due_date) %>
难住了。
【问题讨论】:
标签: ruby-on-rails helpers