Perhaps, but the same does not happen for any other association types.
has_one appears to be the only association that behaves as you
described. Also, that code would not work the other way around:

u = User.find(:first)
u.person.name = "New name"
u.save # person is not saved

-Jonathan.

On 7/28/06, Manfred Stienstra <[EMAIL PROTECTED]> wrote:

On 27-jul-2006, at 16:20, Jonathan Viney wrote:

> Forgot to attach the patch! Here it is ...

There's a good reason for this:

p = Person.find :first
p.user.name = 'New Name'
p.save

_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to