Rails はselect_tagデフォルトで name 引数から id と name を生成します:
select_tag "people", "<option>David</option>".html_safe
# => <select id="people" name="people"><option>David</option></select>
しかし、 and属性selectなしで生成したい場合はどうなるでしょうか? idname
このような:
<select><option>David</option></select>
空の name 引数は機能しません。空の html 属性がまだ存在します:
select_tag "", "<option>David</option>".html_safe
# => <select id name><option>David</option></select>
手動idとname割り当てが機能しない
select_tag "people", "<option>David</option>".html_safe, id: false, name: false
# => <select id=false name=false><option>David</option></select>
select_tag "people", "<option>David</option>".html_safe, id: '', name: ''
# => <select id name><option>David</option></select>