ruby on rails - Passing multiple parameters with one radio_button_tag -


i have:

radio_button_tag :item, value 

however want radio_button_tag passes multiple parameters on submit.

something this:

radio_button_tag "item", "value", "item2", "value2" 

use select not radio button. whole point of radio buttons single button per input (group) can active @ same time.

radio buttons on mdn

<label>whats breakfast?</label> <select name="select" multiple="true">   <option value="value1">eggs</option>    <option value="value2" selected>bacon</option>   <option value="value3">oatmeal</option> </select> 

rails has several helpers creating selects , option tags. http://guides.rubyonrails.org/form_helpers.html#making-select-boxes-with-ease


Comments