invoice_keeper/app/controllers/application_controller.rb

10 lines
240 B
Ruby

class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
before_action :authenticate_user!
before_action :set_locale
def set_locale
I18n.locale = params[:lang] || I18n.default_locale
end
end