I’m new to Rails, this is my first try, so be gentle, I tried to google
but could solve my problem.
I’m trying to use the index-option of, for example, the text_field in a
collection_select. I found out that collection_select expects the index
in the html_options instead of the options as in text_field. I found a
but it had no effect on my output. ATM I’m using:
line_f.collection_select :char_id, @chars, :id, :firstname, :prompt =>
“Choose character”, “index” => 1
But the html output remains as follows:
I expected something like ‘id=“line_1_char_id” name=“line[char_id]”’.
Any idea what I’m doing wrong?