On Oct 10, 8:33 am, cyrusdev08
<cyrusde...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hello All
>
> Is it possible in rails view to put exit like in php ..so that we can
> debug view in rails .. ?
>
> like in php you can print array and put exit ..for debugging view
You can stop execution by raising an exception. For example:
raise ''Forced #raise after doing X"
However, you don''t need to do that to print debugging messages. Simply
use #puts or #pp or whatever, and it''ll appear in the server console
of your Rails app. You just might need to scroll up a little in the
console.
Cheers,
Nick
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---