Forum: Ruby on Rails select statements

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.
985e151e7f58ccc8908bfa651a8242a7?d=identicon&s=25 Matt Daviss (matt_99)
on 2007-07-29 15:27
(Received via mailing list)
Any ideas on this would be great, I'm trying to edit some drop down
lists, the collection _select below does everthing I want it to do and
updates the database successfully but doesn't show the default value
of the drop down when it appears

<%=collection_select('assigned'+assigned.id.to_s, :qual_id,
@quals,:id, :screen_qual)%>

Because of this i started to play with the select statement below
instead, this causes the drop downs to display properly with the
correct stored values

<%=select_tag('assigned'+assigned.id.to_s,
options_from_collection_for_select(@quals, :id, :screen_qual,
assigned.qual_id))%>

but when i try to submit causes an error

'We're sorry, but something went wrong.
We've been notified about this issue and we'll take a look at it
shortly.'

Am i doing somehtinf obviously wrong? Assigned is a join table between
Degree and Qual, the edit function is on a single degree page.

Cheers

Matt
This topic is locked and can not be replied to.