On 27/05/2009, at 9:16 PM, Conrad Taylor wrote:

> An Array instance can respond to both count and size methods.  If  
> you use size the method with a counter
> cache column on the has_many side, you can cache the total.  For  
> example, you can do something
> like this
>

Hi. Not sure where you got that from.

Loading development environment (Rails 2.3.2)
 >> [].count
NoMethodError: undefined method `count' for []:Array
        from (irb):1
 >> [].size
=> 0
 >>


----------------------------------------------
Learn: http://sensei.zenunit.com/
Last updated 20-May-09 (Rails, Basic Unix)
Blog: http://random8.zenunit.com/
Twitter: http://twitter.com/random8r


--~--~---------~--~----~------------~-------~--~----~
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-talk@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