How to update just a HABTM table?

I have to edit users and groups tables via a STP in a legacyDB. so I
can’t let rails just do the default here. But I can edit the join table
with full permissions. I’d rather use some rails magic do the work
rather then writing code to read the join and then decide what to insert
and delete, but everything I do ALSO tries to send updates to the users
and groups tables

is it possible in rails to have

table users
id
name
table groups
id
name
table users_groups
users_id
groups_id

and have a method in either groups or users just update the users_groups
table? Do I have to scaffold the users_groups and put the update/edit
in there so it doesn’t know about the users and groups tables? Please
help, as this is really limiting

see Join update seperation? - Rails - Ruby-Forum for more info.

Rather than use HABTM, have a look at :has_many, :through relations
(HMT), which came out in (from memory) Rails 1.1. These explicitly
specify (in your case) the users_groups table from both the users and
groups models, and let you manipulate users_groups directly.

Also, there’s a habtm_scaffold plugin(?) available, that takes away a
lot of the pain in building data-entry/manipulation screens for HABTM
relations.

Regards

Dave M.