Output an array


#1

Hi

I have an array in a helper method and I want to oupt the contents to
the screen, so i can see waht array key’s are avalible

How can this be done?


#2

ss wrote:

Hi

I have an array in a helper method and I want to oupt the contents to
the screen, so i can see waht array key’s are avalible

How can this be done?

found a .inspect function whcih seemed to do the job if i returned it to
the view, but if anyone knows of any better and quicker ways to de-bug
stuff, please elt me know

thanks
scott


#3

I think you can use:

p array_name


#4

On Monday, June 05, 2006, at 2:58 PM, ss wrote:

stuff, please elt me know

thanks
scott


Posted via http://www.ruby-forum.com/.


Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails

You can use <%= debug(varname) %>