Forum: Ruby on Rails output an array

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
ss (Guest)
on 2006-06-05 16:47
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?
ss (Guest)
on 2006-06-05 16:58
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
Richard W. (Guest)
on 2006-06-05 17:45
(Received via mailing list)
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) %>
Bill (Guest)
on 2006-06-05 18:23
I think you can use:

p array_name
This topic is locked and can not be replied to.