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
Post a Comment