-
Notifications
You must be signed in to change notification settings - Fork 4
turbolinks
mmx edited this page Jan 2, 2019
·
1 revision
The gem has its javascript files which can not work if you are using turbolinks.
The gem uses jQuery.
One of the known issue is that this autocomplete gem is not working for the first page loading, but it works after you refresh the page in browser.
The correct way of using javascripts is by using jQuery Turbolinks.
Gemfile:
gem 'jquery-turbolinks'
App's javascript app/assets/javascripts/application.js:
//= require jquery2
//= require jquery.turbolinks
//= require jquery_ujs
//= require bootstrap
//= require bootstrap3-typeahead
//= require bootstrap3-autocomplete-input.min
// your other js files here...
//= require turbolinksIt is important that bootstrap.js and js for the gem are included AFTER 'jquery.turbolinks' and 'turbolinks' is the LAST included.