Yes, you can create two different sets simply by using a different radio button name:
radio_button_tag 'gender', 'male'
radio_button_tag 'gender', 'female'
radio_button_tag 'food', 'none'
radio_button_tag 'food', 'vegetarian'
radio_button_tag 'food', 'vegan'
This will cause params [: gender] to be “male” or “female”, and params [: food] to be “no,” “vegetarian,” or “vegan.” You can do the same with the radio_button function.
source
share