Join update seperation?

I have a legacy DB without access to change the user or group table
(must use StoredProcedures to edit those). But I do have access to the
usergroup join so I thought the joins would be pretty much like my other
rails apps where I do HABTM checkboxes. I’ve created a page that just
shows habtm checkboxes for the join and the updates are occuring for the
join but I’m getting Access errors on the user table (which I should) .
how do I limit what RAILS wants to update to just the join table. I
thought this (
would do it based on the last comment.

here’s my relevant parts

def joinupdate
@user = user.find(params[:user][:CodeMgmtUserId])
if !params[:user]
flash[‘notice’] = “Update Successful”
render_action ‘edit’



Editing User/Group association for <%= @user.Name %>

<% group.find(:all, :order => "name ASC").each do |mygroup| %>
<%= check_box_tag 'user[CodeMgmtGroupId][]',, @user.groups.include?(mygroup) %> <%= mygroup.Name %> <% end %>


I still can’t get this to work .

here’s the SQL that’s being executed.

the first tow are correct, I’ve selected two checkboxes, pressed submit
SQL (0.037381) INSERT INTO tbl_CodeMgmt_groupuser
([CodeMgmtgroupId], [CodeMgmtuserId]) VALUES (1, 8)
SQL (0.021232) INSERT INTO tbl_CodeMgmt_groupuser
([CodeMgmtgroupId], [CodeMgmtuserId]) VALUES (2, 8)

fine, but then it does (or rather errors while…)

User Update (0.000000) DBI::DatabaseError: 42000 (229)
[Microsoft][ODBC SQL Server Driver][SQL Server]UPDATE permission denied
on object ‘tbl_CodeMgmt_user’, database ‘mytestDB’, owner ‘dbo’.: UPDATE
tbl_CodeMgmt_user SET [desk] = ‘’, [floor] = 1, [title] = ‘’, [Name] =
‘z2’ WHERE Id = 8

isn’t update_attribute supposed to update only what I pass as an
argument? in this case "group_ids "