I want the select to have the current role options for the user
pre-selected when I view it. So if there are five roles in the database
and this user has 3 of them, I would expect to see 3 of the options
selected (each option tag would have selected=“selected” attribute set).
Is there a way to do this? It seems like the :selected option on the
collection_select and options_from_collection_for_select form helpers
only allow you to specify one value. Is this correct?
Is there a way to specify a test for each member of the collection that
will return true when the option should be selected?