option_groups_from_collection_for_select

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="&lt;optgroup label=&quot;Clinical Neuroscience&quot;&gt;&lt;option value=&quot;1&quot;&gt;Prof...&lt;/option&gt;">&lt;optgroup label="Clinical Neuroscience"&gt;&lt;option value="1"&gt;Prof...&lt;/option&gt; </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

So, in case this helps anybody else, I managed to solve the problem by updating to 2.3.8 in my production environment. Turned out to be a version thing after all.