On Jan 6, 9:57 pm, jmcguckin <mcguc...@gmail.com> wrote:
> tag_counts doesn't seem to be working correctly.
>
> Ruby 1.9.2, Rails 2.3.5
>
> # From script/console
>
> ruby-1.9.2-p0 > Corp.tag_counts
>  => [#<Tag id: 1, name: "law">, #<Tag id: 6, name: "vc">]
>
> According to the documentation, I would expect to see a hash of tag-
> name vs. counts entries.

Actually i think it looks like what you are supposed to get back are
tag objects, but with an extra attribute (a count of the number of
occurences). The default inspects method for AR objects doesn't print
extra attributes, but they're their all the same (call .attributes to
see all that attributes an active record object has)

Fred
>
> Joe

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to