Thursday, September 20, 2012

Re: [Rails] jQueryUI autocomplete (Rails 3.1): can't get source as url to work


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" }; });

I see other approaches using more of the autocompletion settings, including callbacks, but I wonder why my simple attempt fails.

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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/jzbiAgt8o7UJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate