Ruby on Rails variables and JavaScript-files -


i looking posibility change variables via ruby on rails in javascript-file.

thats do:

page.js.erb

var page = {   settings: {     locale: '<%= i18n.locale %>'   } } 

if locale changes (by swichting page.com/de/ page.com/en/) javascript not change value of page.settings.locale . how fix this?

only editing file value changed. think kind of server-side-caching.


Comments

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -