Rails 4.1.4, Ruby 2.1.2. Postgres.
I have a user model which has a roles attribute. The roles attribute is a postgres array type. I am trying to create a form with checkboxes of different role options, and a user can select which roles they fit into. If they select the 'director' checkbox, their roles attribute, now you should see:
@user.roles = ['director'].
I am trying to use a form_for, but maybe this is not possible.
Does anyone know how to do this?
form_for(@user) do |f|
f.check_box :roles ...?