I have this form:
<%= form_for @user, url: admin_user_path(@user.id) do |f| %>
<%= f.label :first_name %>
<%= f.text_field :first_name %>
<br>
<%= f.label :last_name %>
<%= f.text_field :last_name %>
<br>
<%= f.label :tags %>
<%= f.text_field :tags_string %>
<%= f.submit "update", placeholder: "Update" %>
<% end %>
@user.tags is an array of strings, with possible ["A","B","C"] as possible tags. Some users have one, some have all of them...etc.
Being tags_string a method which converts tags in a string for having the user editing the form to change it if desired.
However, this is error prone, and I want the user to have the ability to chose between all possible tags having them in checkboxes.
What would I need to do in order to achieve this?
Thanks.