On Nov 25, 11:10 pm, Philip Hallstrom <[EMAIL PROTECTED]> wrote:
> On Nov 25, 2008, at 2:40 PM, Theo Graham-brown wrote:
>
>
> @user.articles.count is Rails magic. It's not actually fetching
> everything and then counting it up, it's looking at the associations
> and building a "SELECT COUNT...."
>
To be quite precise, @user.articles is not an array, it's an
association proxy.
Fred
> @articles above is an array. Try @articles.size.
>
> -philip
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---