Stupid one: anybody have problems with the select helper not selecting
an item?

There are no integer values for my options (they're all strings), so
it's not the usual integer/string conversion problem I've read about.
Imagine "Red," "Green," and "Blue." The value in the database is
"Green," but it isn't displaying the selection, only the first item
(Red).

I get as far as InstanceTag.to_select_tag and can see that "Green" is
set as the selected_value. It's someplace after that, apparently,
where things get messed up.

The name of the form element is correctly set to the model attribute,
such as shirt[color].

I'll keep debugging but am wondering if there's some trick here I'm
not aware of.

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedDec 13, '11 at 3:21a
activeDec 13, '11 at 3:21a
posts1
users1
websiterubyonrails.org
irc#RubyOnRails

1 user in discussion

Djangst: 1 post

People

Translate

site design / logo © 2021 Grokbase