# Select statements

**URL:** <https://www.ruby-forum.com/t/select-statements/110679>\
**Category:** Rails\
**Created:** [July 29, 2007, 3:27pm UTC](https://www.ruby-forum.com/t/select-statements/110679 "2007-07-29T15:27:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vanderkerkoff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/7feea3/32.png) [@vanderkerkoff](https://www.ruby-forum.com/u/vanderkerkoff)\
**Post date:** [July 29, 2007, 3:27pm UTC](https://www.ruby-forum.com/t/select-statements/110679/1 "2007-07-29T15:27:30Z")

</div>

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
