> There seems to be nothing wrong in your code.  All I can think of that 
>>> causes this is if another dom element
>>> has an id of search-markets.  Can you confirm that your view only has 
>>> one dom with this id?
>>>
>>
>> Yes, I confirm. I modified the code to ensure no interference...
>>
>> $('#search-markets').autocomplete ->
>> source: "/searches" 
>>
>> For what it's worth, the coffeescript compiles to this...
>>
>>     $('#search-markets').autocomplete(function() { return { source: 
>> "/searches" }; });
>>
>
> Ah it's stupid of me not to see the difference.  Remove -> and it should 
> work.
>

No, doing that results in no network activity from the widget, at all -- 
kills it. 

This is what the code compiles to without '->'...

$('#search-markets').autocomplete({
source: "/searches"
});

That looks better to me, but it's not happening.

Lille 

 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/lnmGrpvB_1IJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to