# Displaying query results with no looping

**URL:** <https://www.ruby-forum.com/t/displaying-query-results-with-no-looping/91645>\
**Category:** Rails\
**Created:** [April 11, 2007, 3:22am UTC](https://www.ruby-forum.com/t/displaying-query-results-with-no-looping/91645 "2007-04-11T03:22:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roy\_Kolak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/858c86/32.png) [@Roy\_Kolak](https://www.ruby-forum.com/u/Roy_Kolak)\
**Post date:** [April 11, 2007, 3:22am UTC](https://www.ruby-forum.com/t/displaying-query-results-with-no-looping/91645/1 "2007-04-11T03:22:17Z")

</div>

Hello,

Rails Noob here.

ok, I wrote a little query that is doing what it should be doing.  
I run the debug() function on the returned results and I get this…

\<%= debug(@total)%\>

* * *

- !ruby/object:Association  
attributes:  
recordCount: “633”

My question is how can I display what ‘recordCount’ is without looping  
through this data?  
My second question is what am I looking at? Is this thing an object or a  
hash? I am leaning towards an object, but this reminds me too much of  
PHP and the print\_r() function.

very confused,

Roy k

---

<div class="post-metadata">

**Author:** ![Roy\_Kolak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/858c86/32.png) [@Roy\_Kolak](https://www.ruby-forum.com/u/Roy_Kolak)\
**Post date:** [April 11, 2007, 6:30am UTC](https://www.ruby-forum.com/t/displaying-query-results-with-no-looping/91645/2 "2007-04-11T06:30:41Z")

</div>

I figured it out…

> - !ruby/object:Association  
> attributes:  
> recordCount: “633”

\<%= @total[0].recordCount %\>

Thread Closed
