I have a form field where a user inputs a string of tags "foo, bar, foobar". This is sent to the controller as item_params[:tag_list]. In the controller my create action includes @item = Item.create(tag_list: item_params[:tag_list]). This causes the tag_list attribute to be populated as an array of strings ["foo", "bar", "foobar"].
When validation fails I need the input field of the form to be populated with "foo, bar, foobar" and not the array of strings. Is there a way to manipulate this before it goes back to populate the field of the form that failed validation?