<%= debug(some_variable_name) %> works in your RHTML files.
From a controller or model, you can use "p" or the 'logger"
methods to
spit values out to the console and log.
Is that what you meant by "direct to the browser"?
--Wilson.
On 10/5/05, Kai Chan <kai.chan@magharl.co.uk>
wrote:>
> Coming from a Mojavi/PHP background, I could always display debugging
> information from just about anywhere. I've been trying to do the same
within
> Rails and be able to display variable values, array values …etc from within
> the Controller or Model. But any kind of standard output causes an error.
So
> far, I've been using the flash message feature and also output
debugging
> info to local file, both not as convenient as direct output to browser. Can
> somebody help.
>
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails