>
> This is what the code compiles to without '->'...
>>
>> $('#search-markets').autocomplete({
>> source: "/searches"
>> });
>>
>> That looks better to me, but it's not happening.
>>
>
> That's the right js. You should paste here the code which handles
> requests to /searches.
>
Here's a curl to confirm that the resource works...
curl 'http://localhost:3000/searches?term=s'
["seom","some marker","some market","some market","some market","some
market","some market","some market","some market",...]
Could it be the response format? I don't think so, I get positive results
when I do something like this...
$("input#search-markets").autocomplete(
source: (request, response) ->
$.getJSON("/searches", { term: request }, (response) ->
response(result)
)
# $.each(result, (i, val) -> console.log("fuck: "+val)))
select: (event, ui) ->
window.location = ui.item.value
false
)
I'd just like to know why the simple form fails.
I guess I'll drop this soon, as it feels idiosyncratic without broader
interest.
Final call for any comments!
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/bh_akI8gUkQJ.
For more options, visit https://groups.google.com/groups/opt_out.