On Tue, Aug 19, 2008 at 5:58 PM, Frederick Cheung
<[EMAIL PROTECTED]> wrote:

> Can you fix the other problem while you're in there?
> currently if you do
>
> post = Post.create
> post.comments.build
> post.comments.build
> puts post.comments.size
>
> the output is 1

Sure!

I couldn't reproduce this one on edge. It turns out it was fixed in this patch:

   
http://rails.lighthouseapp.com/projects/8994/tickets/305-size-reports-incorrectly-for-collections-when-more-than-one-item-is-added-with-build

The culprit was precisely the detect/select stuff you pointed out
(well, I guess your example was indeed hand made to show a consequence
of the detect call.)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" 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-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to