Isn't the standard way of updating relationships like this to have a select box with name="person[school_id]" which will be updated with update_attributes, like in the second example?
I've attached a patch which fixes the behaviour. I guess school_id could access school.id, and school_id= would have to set @school = nil. It makes more sense to me to put it in the association accessor, rather than modifiying the attribute accessors. -Jonathan. On 7/31/06, Michael Koziarski <[EMAIL PROTECTED]> wrote:
Again, the .school_id accessors aren't really meant for use like this. I suppose the accessors could check the ids, but it seems like a lot of work for a corner case. An alternative would be to let the school_id accessor use school.id if the proxy's been loaded. -- Cheers Koz
refresh_belongs_to_on_foreign_key_mismatch.diff
Description: Binary data
_______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core