I\'ve litte problem with radiobuttons in SimpleForm.
When i use
= f.association :manufactureType, :collection => ManufactureType.all, :as => :
from op's comment, adding this parameter worked for me:
:checked => 1
If you pass in the manufacture types into the view, you can do the following:
:checked => @manufacture_types[0]
Or
:checked => ManufactureType.first
Here is an excerpt of my code which works:
= f.input :body_format,
collection: [['markdown', 'Markdown']],
label_method: :last,
value_method: :first,
as: :radio_buttons,
checked: 'markdown', # THIS
required: true
My example was slightly more complicated, none of the other answers worked for me since there was no collection or model to reference.
= f.input :attending, as: :radio_buttons, :collection => [ ['Yes', true], ['No', false] ], :checked => ['Yes', true]