Hans <Hans.Marmolin@...> writes:

> 
> Thanks for the advices
> 
> Matt do you mean that I should use
> relationship.related_person=Person.new instead of changing the foreign
> key directly
> If so, is that a general requirement when updating foreign keys ?

I think he means:

person = Person.first
other_person = Person.last
person.relationships << other_person

or

person.relationships << Person.new

or even better

person.relationships << Person.create(params[:person])


> 
> Andrew
> How do I avoid the caching/stale record process
> I have tried to make an extra save for all involved object but did not
> change anything

Stale objects can be a fickle affair and there are no magic bullets.  Sorry.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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-talk?hl=en.

Reply via email to