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

Reply via email to