Sha256: 2deed8e19c9fc4e6c8aa239d50d050be0d451a540780fb70c56e0cf74ba13077
Contents?: true
Size: 396 Bytes
Versions: 3
Compression:
Stored size: 396 Bytes
Contents
class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception prepend_before_filter :set_locale private def set_locale if I18n.available_locales.map(&:to_s).include?(params[:locale]) I18n.locale = params[:locale] end end end
Version data entries
3 entries across 3 versions & 1 rubygems