Sha256: f7080242888afef09073d2c5c3173f1a0a79ce634dff457e631f6a3e32af364a
Contents?: true
Size: 767 Bytes
Versions: 10
Compression:
Stored size: 767 Bytes
Contents
module TranslationCenter class ApplicationController < ActionController::Base before_filter :translation_langs_filters before_filter :authenticate_user! if Rails.env.development? # if an exception happens show the error page rescue_from Exception do |exception| @exception = exception @path = request.path render "translation_center/errors/exception" end end # defaults def translation_langs_filters session[:current_filter] ||= 'untranslated' session[:lang_from] ||= :en session[:lang_to] ||= :en I18n.locale = session[:lang_from] || I18n.default_locale end protected def can_admin? current_user.can_admin_translations? end end end
Version data entries
10 entries across 10 versions & 1 rubygems