Typeahead for rails with remote data -


currently typeahead works on local machine thise

$(document).ready(function(d){ var companies = new bloodhound({     datumtokenizer: bloodhound.tokenizers.obj.whitespace('value'),     querytokenizer: bloodhound.tokenizers.whitespace,     remote: {         //url: '/javascripts/company_list.json',         url: 'http://localhost:3000/?utf8=%e2%9c%93&search=%query'     } }); 

i wondering if did url part correctly? works that, feel hardcoded , wanted know best way handle if move heroku. thanks!

var departaments = new bloodhound({     datumtokenizer: function(d) {         return bloodhound.tokenizers.whitespace(d.value);        },querytokenizer: bloodhound.tokenizers.whitespace,     limit: 6,     remote: '/departaments?value=%query' }); 

with works me, in case maybe is

remote: '/?value=%query'


Comments

Popular posts from this blog

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -