# Collection\_select broken in 2.1.x?

**URL:** <https://www.ruby-forum.com/t/collection-select-broken-in-2-1-x/152524>\
**Category:** Rails\
**Created:** [November 4, 2008, 8:26pm UTC](https://www.ruby-forum.com/t/collection-select-broken-in-2-1-x/152524 "2008-11-04T20:26:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 4, 2008, 8:26pm UTC](https://www.ruby-forum.com/t/collection-select-broken-in-2-1-x/152524/1 "2008-11-04T20:26:39Z")

</div>

Greetings,

Can someone verify for me if collection\_select is broken in Rails  
2.1.x? I have an administrative form where an administrator can  
update the subscription level of a user. In the partial I say

\<%= collection\_select(:user, :subscriptiontype\_id,  
Subscriptiontype.find(:all), :id, :dropdown\_description) %\>

which is almost verbatim-copied from the documentation

collection\_select(:post, :author\_id,  
Author.find(:all), :id, :name\_with\_initial, {:prompt =\> true})

The dropdown shows the proper entries but the current value of  
user.subscriptiontype\_id is never selected.

Any suggestions? Thanks.

–cro

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 4, 2008, 9:43pm UTC](https://www.ruby-forum.com/t/collection-select-broken-in-2-1-x/152524/2 "2008-11-04T21:43:13Z")

</div>

> The dropdown shows the proper entries but the current value of  
> user.subscriptiontype\_id is never selected.

OK, nevermind, I had created user.subscriptiontype\_id with the wrong  
type (string). Fixing this fixed the problem.

–cro
