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

c++ - Do gcc's __float128 floating point numbers take the current rounding mode into account? -

java - the value of local variable is not used -