I am needing to have an attribute in my form (:supported_media_types) accept an array of values.
For example, I want the user to be able to click on both JPG and PNG if required.
I have setup a select2 drop down with multiple: true
Is there an easy way to achieve this or am I required to create a join table?
<%= f.select :supported_ad_types, supported_types_of_media, {include_blank: true}, {class: 'filter_select', name: 's2id_location_supported_ad_types[]', style:'width:100%;', placeholder: 'Supported File Types', required: true, multiple: true} %>