Hi,

I have a User model with a HABTM relation to a Role model and vice
versa. So There's a roles_users table that references :user and :role.

I'm using formtastic, and in the user.edit.html.erb I have a line that
outputs the roles as a multi-select list box. But the box is not
showing the roles that have been assigned to the users.

Another problem is that if I select a few roles and press the update
button, the roles are not being asssigned. I have to manually assign
roles by accessing the database.

Isn't this stuff supposed to happen automatically when you call
@user.update_attributes(params[:user]) in the user_controller ?

Thanks in advance.

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