① Set the data type when using enum to gender: integer
② Describe enum gender: {man: 0, woman: 1} in the model
③ Create view
<%= f.label :man %>
<%= f.radio_button :gender, :man %>
<%= f.label :woman %>
<%= f.radio_button :gender, :woman %>
Completion: blush:
However, if this is the case, the view will say man or woman, so
I enum gender: {male: 0, female: 1}
<%= f.label :Man%>
<%= f.radio_button :gender, :Man%>
<%= f.label :woman%>
<%= f.radio_button :gender, :woman%>
I made it like that. I don't know if it's okay, but: sweat:
Should I use a gem that translates English into Japanese? ??
Recommended Posts