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()
加载中,请稍侯......
精彩评论