阅读背景:

简化Rails中的多重nil检查

来源:互联网 

How should I write:

我该如何写:

if @parent.child.grand_child.attribute.present?
  do_something
if @parent.child



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: