Managing relationships in the form


#1

project has_and_belongs_to_many :users
user has_and_belongs_to_many :projectss

Project Managers: <%= collection_select(‘project’,
‘user_ids’,@resources, :id, :username,{}) %>
Users: <%= collection_select(‘project’,
‘user_ids’,@resources, :id, :username,{},{:multiple => true}) %>

Hi I am a newbie to Ruby and Rails.I am having some problems.I am
creating a new project in the form and I want to insert some users and
one project manager for that project.
If I include only one of the above select it works but and the
relationship table gets updated but if I use both I am getting “500
Internal Server Error”.

Can someone get me to some useful tutorials or help in the matter.