Hi Gaspard, That's a lot simpler than my patch for the same thing, but it doesn't cover many edge-cases. You can take a look at my patch (and the conversation in the comments) here: http://rails.lighthouseapp.com/projects/8994/tickets/1619
Please join the conversation I'd love to get some more eyeballs and brains thinking about this feature. Regardless of what implementation AR ends up using, I really think it should do *something* like this. Cheers, Murray 2009/2/8 Gaspard Bucher <[email protected]> > > Currently, this is false: > > master.slaves.build.master == master > > This very short patch in AR solves it: http://gist.github.com/60504 > > The patch also avoids DB calls in: > > master.slaves.first.master > > Since it is so simple, what is the reason for not implementing it ? > > Gaspard > > > PS: > Master.has_many :slaves, :class_name => 'Slave' > Slave.belongs_to :master > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
