开发者

Rails equivalent to php die()?

Is there an equivalent in Rails to PHP's die()?

I have a case where it would make my controller code a 开发者_JAVA技巧little cleaner to set it up in a way that would sometimes call render twice, unless there is a die() that is.


abort("Message goes here")

See: How to create an exit message


A direct mapping of PHP's die() in Ruby would be Kernel::exit()

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜