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

Version Path
awesome_translations-0.0.60 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.59 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.58 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.57 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.56 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.55 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.54 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.53 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.52 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.51 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.50 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.49 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.48 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.47 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.46 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.45 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.44 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.43 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.42 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.41 spec/dummy/app/controllers/application_controller.rb