I imagine you don''t update the join table entry, instead removing the
record(s) already in place and adding a new one.
Because joins in mm tables are meant to signify a relationship
between two or more tables, when that relationship is broken the
record should be removed.
On Aug 5, 2005, at 10:05 AM, J Brien wrote:
> I have a Join table in a habtm situation that I am having problems
> getting information to update in it. I understand that this would
> create the relationship in an article / category relationship;
>
> @category =
Category.find(@params[''category''][''id''])
> @article.categories << @category
>
> What would be the equivalent for an update call. If I reuse this
> code I get another association entry not get the original entry
> updated.
>
> J Brien | HybridIndie Productions | hybridindie.com |
> iam-QLwuMy0vUAhCl22TKe+ceQ@public.gmane.org
>
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>