title: Rails and Mongoid :: Converting Strings to Arrays
body: <p>I collect tags in a nice javascript UI widget. It then takes all the tags and passes them to the server as tag1,tag2,tag3,etc in one text_field input. The server receives them:</p>
  
  <pre><code>params[:event][:tags] = params[:event][:tags].split(',') # convert to array
  @event = Event.find(params[:id])
  </code></pre>
  
  <p>Is there a better way to convert the string to the array? It seems like a code smell. I have to put this both in update and in the new actions of the controller.</p>