Hi,
in my development environment (Ruby 1.87, Rails 2.3.8) the following
code works fine:
<%= select "applicant", "member_1",
option_groups_from_collection_for_select(@topics, :members, :topic, :id,
:name, @applicant.member_1), {:include_blank => true} %>
Producing:
<optgroup label="Clinical Neuroscience">
<option value="1">Prof ...</option>
<option value="2">Prof ... </option>
...
</optgroup>
Yet in my production environment (Ruby 1.8.7, Rails 2.3.2) this code
produces really weird output, sticking the previous output into an
option value and escaping it:
<option value="<optgroup label="Clinical
Neuroscience"><option
value="1">Prof...</option>"><optgroup
label="Clinical Neuroscience"><option
value="1">Prof...</option>
</option>
Does anyone know why this is?
I have tried googling to find out if
''option_groups_from_collection_for_select'' is compatible with
Rails
2.3.2, but as far as I can tell, it is.
http://apidock.com/rails/v2.3.2/ActionView/Helpers/FormOptionsHelper/option_groups_from_collection_for_select
--
Posted via http://www.ruby-forum.com/.
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.