crowdint/rails3-jquery-autocomplete — pull request #269 by bitgangsta (2014-03-31 00:39:02+00:00)
Title: Forcing root node false for rendering JSON

Per issue #260 - the JS assumes there is no root node (and breaks if there is one present). For many folks using Rails, they have root nodes turned on by default in the ActiveModel serializers (for instance if you have an API for your Rails app, this is a very common practice).

This default can be easily overridden without any risks I can see. This pull request does this.

I didn't see any specs around the `define_method("autocomplete_#{object}_#{method}") ` section to the `autocomplete` class method so I didn't add any test for this. However, it doesn't break anything in the existing test suite.

I think this can only help users avoid an issue with root nodes and hope you'll merge it in :) But I'm open to feedback if you'd like me to change anything.