I have 2 routes an index and an edit route. On the edit route i have an input to initialize as a bootstrap-file input. If i refresh my page on the edit route, the bootstrap-file input is initialized, but if i come from the index page through a link to the edit route, it is not being initialized, how do i do this?
Asked
Active
Viewed 53 times
1 Answers
0
Please take a look at this question, the user explains it very well.
JQuery gets loaded only on page refresh in Rails 4 application
To fix what rails is doing. Add gem 'jquery-turbolinks' to your gem file and follow the instructions provided on https://github.com/kossnocorp/jquery.turbolinks