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