oldhamcr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Nov-04 18:36 UTC
collection_select broken in 2.1.x?
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
oldhamcr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Nov-04 20:42 UTC
Re: collection_select broken in 2.1.x?
> 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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---