开发者

Ruby on Rails: comparing dates error?

undefined method `<' for nil:NilClass

the line the error 开发者_JAVA技巧occurs on

@object.expires_at < Date.today

so.. how do I compare dates?


I just upgraded to rails 2.3.8 from 2.3.4..

this fixed it

@object.expires_at < Date.today unless @object.expires_at.nil?
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜