title: acts_as_taggable_on and select2 returning weird results in Active Admin
body: <p>So I have been playing around with <code>acts_as_taggable_on</code> in active admin, and for the most part everything is working as expected.</p>
  
  <p>However, whenever I search for tags, and add an <em>existing</em> tag to a model, it seems to save it as the ID, rather than as the name. Creation of new tags returns the name fine, and when I go to edit the object again the tags remain tagged by the name. But when I try and add another tag, one that already exists in the database, it returns the name in the form, and seems to save OK, but when I go back to edit the onject again the tag shows up as an ID, rather than the name.</p>
  
  <p>In <code>admin/gift.rb</code>:</p>
  
  <pre><code>controller do
    def autocomplete_gift_tags
      @tags = ActsAsTaggableOn::Tag
        .where("name LIKE ?", "#{params[:q]}%")
        .order(:name)
      respond_to do |format|
        format.json { render json: @tags , only: [:id, :name], root: false }
      end
    end
  end
  </code></pre>
  
  <p>In <code>tag-autocomlete.js</code>:</p>
  
  <pre><code>$(document).ready(function() {
    $('.tagselect').each(function() {
      var placeholder = $(this).data('placeholder');
      var url = $(this).data('url');
      var saved = $(this).data('saved');
      $(this).select2({
          tags: true,
          placeholder: placeholder,
          minimumInputLength: 1,
          initSelection: function(element, callback) {
              saved &amp;&amp; callback(saved);
          },
          ajax: {
              url: url,
              dataType: 'json',
              data: function(term) {
                  return {
                      q: term
                  };
              },
              results: function(data) {
                  return {
                      results: data
                  };
              }
          },
          createSearchChoice: function(term, data) {
              if ($(data).filter(function() {
                  return this.name.localeCompare(term) === 0;
              }).length === 0) {
                  return {
                      id: term,
                      name: term
                  };
              }
          },
          formatResult: function(item, page) {
              return item.name;
          },
          formatSelection: function(item, page) {
              return item.name;
          }
      });
    });
  });
  </code></pre>
  
  <p>And in my <code>_gift_form.html.erb</code>:</p>
  
  <pre><code>&lt;%= f.input :tag_list, label: "Tags", input_html: { data: { placeholder: "Enter tags",  saved: f.object.tags.map{|t| {id:  t.name, name: t.name}}.to_json, url: autocomplete_gift_tags_path }, class: 'tagselect' } %&gt;
  </code></pre>
  
  <p>Can't work out why the new ones are working, but the existing tags are not.</p>