This didn't work me: Rails - Default selected radiobutton in SimpleForm :collection
I am trying to have a default selection.
I have the following input in my form using simple_form
= f.association :collection_page
This generates a drop down with all the titles in my CollectionPage object.
Kinda like:
- title1
- title2
- title3
lets say, @collection_page.title = title1
if I do:
= f.association :collection_page, as: :radio, :checked => @collection_page.title
title1 should be selected by default, but it isn't working for me.
Thank you in advance for your help.