I have a select tag nested in my form and I am needing to delete an item from my options_for_select array if it equals the word English
code:
<%= fields_for :users_languages do |u| %>
<div class="field">
<%= u.label :Assign_Languages %><br />
<%= select_tag :language_id,
options_for_select(Language.all.collect {|lang|
[lang.english, lang.id].delete_if {lang.english == "English"}
}, @lang_list),
:multiple => true,
:prompt => 'Select Language' %>
</div>
<% end %>
Problem: The above code works fine, but for some reason the first option is still shown in the mutli-select producing a blank select option. Is there anyway to get rid of the select option and its value? Am I even doing this correctly?
Thanks for all the help in advance!