Collection_select broken in 2.1.x?


#1

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


#2

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