[Rails] Re: What kind of a construct is this?
Florian Groß
florgro at gmail.com
Mon Feb 28 14:03:28 GMT 2005
Adam Fields wrote:
> I used @variable.inspect to print out the contents of the return from
> Object.find_all, and got something like this:
>
> [#"9", "field1"=>"1", "id"=>"1", "field2"=>"5"}>, #"2", "field1"=>"1", "id"=>"2", "field2"=>"6"}>]
>
> What are the #"9" and #"2", and why does each element end with }>?
>
> What am I looking at here?
Make sure to wrap the actual output of .inspect in <pre> or you will end
up missing quite a bit of the output. (As above)
Another option is to just use breakpoints where the output of course
doesn't end up in your web browser but rather in a debugging terminal.
More information about the Rails
mailing list