My dev environment allows me to change my app locale in a controller by setting
I18n.locale = 'fr'
It works on both dev and prod env on my laptop, but if I were to deploy it on Heroku it no longer works, as if the changes are disregarded. Someone might know why?
p.s: If I preset the default_locale in the initializer both versions of the site (in my case English and French) work. But the switching at runtime doesn’t
The problem wasn’t related to that. I failed to explain that I was building an app on Spree and their localization works based on the
session[:locale]variable. I had to set that first.