Sha256: a66466d6b6da03002545cfaed040ce614434de82b27197e0bd0d4ebb322fc4eb
Contents?: true
Size: 433 Bytes
Versions: 35
Compression:
Stored size: 433 Bytes
Contents
class ApplicationController < ActionController::Base include AwesomeTranslations::ControllerTranslateFunctionality # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception before_action :set_locale private def set_locale if session[:locale] I18n.locale = session[:locale] else I18n.locale = :en end end end
Version data entries
35 entries across 35 versions & 1 rubygems