On May 11, 8:13 am, Sebastian <[email protected]> wrote:
> Everything is working great in my database. I only have one problem in
> the controller below. I need the @family.watchedmembers for a next
> step, but the problem is that the @family.watchedmembers variable has
> the old and the new members in its memory. The database is updated and
> correct! It is only the @family.watchedmembers variable that has both
> members in it.

By default, ActiveRecord caches the found records for an association -
doing this:

@family.watchedmembers(true)

will force the association to reload from the database.

--Matt Jones

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