Displaying query results with no looping



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
    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


I figured it out…

  • !ruby/object:Association
    recordCount: “633”

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

Thread Closed