Problem with acts_as_taggable_on

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.

Joe

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

You are correct!

ruby-1.9.2-p0 > Corp.tag_counts[0].attributes
=> {"count"=>"19", "id"=>1, "name"=>"law"}

Thanks!!

Joe