mcrowe/soulmate.js — Issue #4: Console errors when entering a search string
Author: awlunsfo
Created: 2012-01-10 03:23:19+00:00
State: open

I apologize in advance for my newbie-ness to all of this:

Setup:
Rails 3.1.3
MongoDB through MongoID (2.3.4)

I've mounted Soulmate into my existing rails app and I'm trying to use your plugin to render an auto-completer. So far I can send and retrieve data through Redis with Soulmate, and after following your guide I have functioning auto-complete input box...well, almost functioning.

Whenever I enter a search string into the input box, I get console errors (using Chrome 16.0.912.75 m) to the tune of:

GET http://127.0.0.1:3000/sm/search?callback=jQuery16209289398335386068_1326164417210&term=doc&types%5B%5D=profession&limit=5
*f.ajaxTransport.send* **jquery-1.6.2.min.js:19**
*f.extend.ajax* **jquery-1.6.2.min.js:19**
*Soulmate.fetchResults* **jquery.soulmate.js:266**
*Soulmate.handleKeyup* **jquery.soulmate.js:243**
*__bind* **jquery.soulmate.js:3**
*f.event.handle* **jquery-1.6.2.min.js:18**
*f.event.add.i.handle.k* **jquery-1.6.2.min.js:17**

...and nothing renders where the Suggestion area should.

What's strange (to me) is that I can copy+paste that url from the GET request into my browser and it returns a valid string from the Soulmate server:

jQuery162031847008573822677_1326164120568({"term":"doc","results":{"profession":[{"term":"Doctor","id":"4f0ba88969dabc2cde00001c"}]}})

I can't tell if the error is coming from jquery.soulmate.js or if something bad is being passed to jquery-1.6.2.min.js...or something totally different.

If you are able to shed any light on this, I would appreciate it. Thanks :)