title: select2 not saving input for Edit
body: <p>For some reason when a user goes to edit an entry none of the data he had inputted via <code>.select2</code> is shown. The data was saved though.</p>
  
  <pre><code>irb(main):001:0&gt; Routine.find(1)
  =&gt; #&lt;Routine id: 1, missed_days: 0, date_started: "2015-10-24 04:00:00", trigger: "brew tea", action: "stretch", user_id: 1, created_at: "2015-11-24 21:55:25", updated_at: "2015-12-14 21:00:09", committed: ["sun", "mon", "tue", "wed", "thu", "fri", "sat", ""], days_challenged: 30&gt;
  </code></pre>
  
  <p><strong>show.html.erb</strong></p>
  
  <p><a href="https://i.stack.imgur.com/f4j9t.png"><img src="https://i.stack.imgur.com/f4j9t.png" alt="enter image description here"></a></p>
  
  <p><strong>edit.html.erb</strong></p>
  
  <p><a href="https://i.stack.imgur.com/bK3uo.png"><img src="https://i.stack.imgur.com/bK3uo.png" alt="enter image description here"></a></p>
  
  <p><strong>_form.html.erb</strong></p>
  
  <pre><code>&lt;%= simple_form_for(@routine, remote: request.xhr?, html: { data: { modal: true } }) do |f| %&gt; 
    &lt;%= f.date_select :date_started, :order =&gt; [:month, :day, :year], class: 'date-select' %&gt;
    &lt;%= f.collection_check_boxes :committed, Date::ABBR_DAYNAMES, :downcase, :to_s %&gt;
    &lt;%= f.number_field :days_challenged, value: 30, class: 'day-challenge' %&gt; &lt;b&gt;Day Challenge
    &lt;label&gt;After I&lt;/label&gt; 
      &lt;%= f.grouped_collection_select(:trigger, @trigger, :last, :first, :to_s, :to_s, include_blank: true) %&gt;&lt;font color="#DDD"&gt;,&lt;/font&gt;
    &lt;label&gt;I will&lt;/label&gt; 
      &lt;%= f.grouped_collection_select(:action, @action, :last, :first, :to_s, :to_s, include_blank: true) %&gt;.
    &lt;%= button_tag(type: 'submit', class: "btn")  do %&gt;
     Save
    &lt;% end %&gt;
  &lt;% end %&gt;
  
  &lt;script&gt;
    $("#routine_trigger").select2({
      placeholder: "Existing Habit (Optional)",
      theme: "classic",
      allowClear: false,
      tags: true,
      multiple: false,
    });
    $("#routine_action").select2({
      placeholder: "Enter Challenge",
      allowClear: false,
      tags: true,
      multiple: false,
    });
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>routines_controller</strong></p>
  
  <pre><code>  def new
      @trigger = 
      [
      ['Morning', ['Get Out of Bed', 'Clean Up Breakfast', 'Brush My Teeth', 'Sit at Desk', 'Start My Computer']], 
      ['Afternoon', ['Drink Coffee', 'Read Email', 'Eat Lunch', 'Use the Bathroom', 'Go for a Walk']],
      ['Evening', ['Enter My Home', 'Eat a Snack', 'Make a Drink', 'Shower', 'Finish Dinner']]
      ]
      @action = 
      [
      ['Mind', ['Write 500 Words', 'Read a Chapter', 'Study 20 min', 'Watch a Ted Talk', 'Take a Picture']], 
      ['Body', ['Do 25 Pushups', 'Juice Cleanse', 'Walk 10,000 Steps', 'Exercise', 'Eat an Apple']],
      ['Spirit', ['Meditate', 'Write 3 Gratitudes', 'Journal', 'Not Complain', 'Do a Random Act of Kindness']]
      ]
      if current_user == nil
        @routine = Routine.new
      else
        @routine = current_user.routines.build
        respond_modal_with @routine
      end
    end
  
    def edit
      @trigger = 
      [
      ['Morning', ['Get Out of Bed', 'Clean Up Breakfast', 'Brush My Teeth', 'Sit at Desk', 'Start My Computer']], 
      ['Afternoon', ['Drink Coffee', 'Read Email', 'Eat Lunch', 'Use the Bathroom', 'Go for a Walk']],
      ['Evening', ['Enter My Home', 'Eat a Snack', 'Make a Drink', 'Shower', 'Finish Dinner']]
      ]
      @action = 
      [
      ['Mind', ['Write 500 Words', 'Read a Chapter', 'Study 20 min', 'Watch a Ted Talk', 'Take a Picture']], 
      ['Body', ['Do 25 Pushups', 'Juice Cleanse', 'Walk 10,000 Steps', 'Exercise', 'Eat an Apple']],
      ['Spirit', ['Meditate', 'Write 3 Gratitudes', 'Journal', 'Not Complain', 'Do a Random Act of Kindness']]
      ]
      respond_modal_with @routine
    end
  </code></pre>