I'm trying to make so that the user sees a number of options (I'm currently trying with check boxes) as selects multiple items, then turns into a single string joined by commas when the user submits it, ex:
<%= f.check_box :answer %><%= option.description %>
<%= f.check_box :answer %><%= option.description %>
<%= f.check_box :answer %><%= option.description %>
where :answer is an attribute in my Answer model and description is an attribute in my Option model, if multiple options are selected I want them to be saved as a single string like so:
"description1,description2,description3"
in order to save it to a single column in my database, how can I achieve this?