Forum: Ruby on Rails Managing relationships in the form

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Prabesh S. (Guest)
on 2009-05-16 14:25
(Received via mailing list)
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.
This topic is locked and can not be replied to.