时间与零的比较失败

时间:2014-05-30 11:38:37

标签: ruby-on-rails ruby ruby-on-rails-4

我得到时间与nil的错误比较失败。我看到两个时间值都完美打印,但distance_of_time_in_words仍然会抛出错误。

<%= comment.created_at %> //2014-05-29 07:47:18 UTC
<%= comment.article.created_at %> //2014-05-29 07:44:22 UTC 
<p>Posted <%= distance_of_time_in_words(comment.article.created_at,
                                      comment.created_at) %> later </p>

0 个答案:

没有答案