In my bi-lingual Rails 4 application I have a LocalesController
like this:
class LocalesController < ApplicationController
def change_loca
If you want this behaviour, you are going to have to compare the URL against the session every request. One way you might do it is like this:
before_filter :check_locale
def check_locale
if session[:locale] != params[:locale] #I'm assuming this exists in your routes.rb
params[:set_locale] = params[:locale] #Generally bad to assign things to params but it's short for the example
change_locale
end
end