Forum: Ruby on Rails Managing relationships in the form

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D63980ae502f0f3e827baf95c32166ee?d=identicon&s=25 Prabesh Shrestha (prabesh)
on 2009-05-16 12: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.