Sha256: 7076377d2e226c691acec016fd7c637d24c09977302c42e40f2c99f77bfce4f9

Contents?: true

Size: 501 Bytes

Versions: 24

Compression:

Stored size: 501 Bytes

Contents

module TranslationCenter
  class ApplicationController < ActionController::Base
    before_filter :translation_langs_filters
    before_filter :authenticate_user!

    # 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

24 entries across 24 versions & 1 rubygems

Version Path
translation_center-1.3.1 app/controllers/translation_center/application_controller.rb
translation_center-1.3.0 app/controllers/translation_center/application_controller.rb
translation_center-1.2.1 app/controllers/translation_center/application_controller.rb
translation_center-1.2.0 app/controllers/translation_center/application_controller.rb
translation_center-1.1.0 app/controllers/translation_center/application_controller.rb
translation_center-1.0.4 app/controllers/translation_center/application_controller.rb
translation_center-1.0.3 app/controllers/translation_center/application_controller.rb
translation_center-1.0.2 app/controllers/translation_center/application_controller.rb
translation_center-1.0.1 app/controllers/translation_center/application_controller.rb
translation_center-1.0.0 app/controllers/translation_center/application_controller.rb
translation_center-0.0.14 app/controllers/translation_center/application_controller.rb
translation_center-0.0.13 app/controllers/translation_center/application_controller.rb
translation_center-0.0.12 app/controllers/translation_center/application_controller.rb
translation_center-0.0.11 app/controllers/translation_center/application_controller.rb
translation_center-0.0.10 app/controllers/translation_center/application_controller.rb
translation_center-0.0.9 app/controllers/translation_center/application_controller.rb
translation_center-0.0.8 app/controllers/translation_center/application_controller.rb
translation_center-0.0.7 app/controllers/translation_center/application_controller.rb
translation_center-0.0.6 app/controllers/translation_center/application_controller.rb
translation_center-0.0.5 app/controllers/translation_center/application_controller.rb