How can I abort processing in the middle of a page & return?

Hi, basically for those who know ColdFusion I’m looking for a CFABORT
tag but in ruby on rails :smiley:

In a nutshell it’s used for debugging, i know in ruby you can use <%=
debug(@order) %> to dump the content of the object, or even use
breakpointers… it’s just that I’d love to have a way to just dump the
object, then immediately abort the processing of the request and return
the truncated results to the user.

That would save me a lot of time.

Any idea how I could do that?

TIA!

throw an exception?

or, how about a

return;

steve dogers wrote:

it’s just that I’d love to have a way to just dump the
object, then immediately abort the processing of the request and return
the truncated results to the user.

That would save me a lot of time.

Any idea how I could do that?

raise @object.inspect

or

return false (if you just want to abort processing).

You cannot, however, return the truncated results, as they don’t yet
exist until rendered. Rails doesn’t work with, err, buffered output, I
believe it’s called.


Jakob S. - http://mentalized.net

script/console ?