ruby on rails - How do I use Turbolinks and local_time together? -


i've noticed recently, since installing rails 5 local_time gem doesn't work on pages link internal (through turbolinks). if link page external or browser refreshed, or turbolinks disabled, local_time works properly.

does know how use these together?

i needed initialize local time on turbolinks load. event provides chance things have run @ document ready. javascript is:

document.addeventlistener("turbolinks:load", function() {   localtime.run(); }); 

Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -