Sha256: 0c39ffe08b6f2e073e9a05fdfd0251ab8f33c7cb95e4fce148e4d3b40f558827

Contents?: true

Size: 433 Bytes

Versions: 4

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_filter :set_locale

private

  def set_locale
    if session[:locale]
      I18n.locale = session[:locale]
    else
      I18n.locale = :en
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
awesome_translations-0.0.25 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.24 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.23 spec/dummy/app/controllers/application_controller.rb
awesome_translations-0.0.22 spec/dummy/app/controllers/application_controller.rb