steve dogers
2006-Nov-22 14:39 UTC
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 :D 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! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
igotimac-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Nov-22 14:45 UTC
Re: How can I abort processing in the middle of a page & return?
throw an exception? or, how about a return; --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jakob Skjerning
2006-Nov-22 14:52 UTC
Re: How can I abort processing in the middle of a page & 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 Skjerning - http://mentalized.net --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
script/console ? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---