On 20 Aug 2008, at 00:39, Xavier Noria wrote:
>
> 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.co
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 t
On Tue, Aug 19, 2008 at 5:39 PM, Xavier Noria <[EMAIL PROTECTED]> wrote:
> Correct, a simple way to depict the underlying problem is:
>
> [EMAIL PROTECTED]:~/tmp/test_associations$ cat test_build.rb
> post = Post.create
> post.comments.build
> puts post.comments.size
> puts post.comment
On 19 Aug 2008, at 16:39, Xavier Noria wrote:
>
> Correct, a simple way to depict the underlying problem is:
>
> [EMAIL PROTECTED]:~/tmp/test_associations$ cat test_build.rb
> post = Post.create
> post.comments.build
> puts post.comments.size
> puts post.comments.size
> [EMAIL PROTEC
On 19 Aug 2008, at 16:10, Xavier Noria wrote:
>
> I am precisely documenting associations these days.
>
> I think the problem is not related to #build itself, that method adds
> the model to the target of the proxy just fine:
>
> [EMAIL PROTECTED]:~/tmp/test_associations$ cat test_build.rb
>
Correct, a simple way to depict the underlying problem is:
[EMAIL PROTECTED]:~/tmp/test_associations$ cat test_build.rb
post = Post.create
post.comments.build
puts post.comments.size
puts post.comments.size
[EMAIL PROTECTED]:~/tmp/test_associations$ script/runner test_build.rb
On Tue, Aug 19, 2008 at 5:10 PM, Xavier Noria <[EMAIL PROTECTED]> wrote:
> and no template gets rendered). My conjecture is that the call to
> #size resets the proxy somehow.
>
> I may complete the walkthrough later but that's what I've got by now.
> Next target is count_records.
Bingo, I could
I am precisely documenting associations these days.
I think the problem is not related to #build itself, that method adds
the model to the target of the proxy just fine:
[EMAIL PROTECTED]:~/tmp/test_associations$ cat test_build.rb
post = Post.create
post.comments.build
puts post.comm
Should I open a ticket for this?
On Aug 19, 10:00 am, Ryan Bigg <[EMAIL PROTECTED]> wrote:
> It would be loading the associated objects without checking to see if
> they are a #new_record?... seems like a bug to me.
--~--~-~--~~~---~--~~
You received this message
It would be loading the associated objects without checking to see if
they are a #new_record?... seems like a bug to me.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To post to this
10 matches
Mail list logo