Sha256: 0547edf59540577c17b4f41902312a51d92b280c1420f6b378598f916d9e7e33

Contents?: true

Size: 395 Bytes

Versions: 19

Compression:

Stored size: 395 Bytes

Contents

class ApplicationController < ActionController::Base
  protect_from_forgery

  before_filter :set_locale

  private

  def set_locale
    I18n.locale = params[:locale] if params[:locale].present?
    # current_user.locale
    # request.subdomain
    # request.env["HTTP_ACCEPT_LANGUAGE"]
    # request.remote_ip
  end

  def default_url_options(options = {})
    {locale: I18n.locale}
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
static_blocks-1.2.1 spec/dummy/app/controllers/application_controller.rb
static_blocks-1.2.0 spec/dummy/app/controllers/application_controller.rb
static_blocks-1.1.5 spec/dummy/app/controllers/application_controller.rb
static_blocks-1.1.4 spec/dummy/app/controllers/application_controller.rb
static_blocks-1.1.3 spec/dummy/app/controllers/application_controller.rb
static_blocks-1.1.2 spec/dummy/app/controllers/application_controller.rb
static_blocks-1.1.1 spec/dummy/app/controllers/application_controller.rb
static_blocks-1.1.0 spec/dummy/app/controllers/application_controller.rb
static_blocks-1.0.3 spec/dummy/app/controllers/application_controller.rb
static_blocks-1.0.2 spec/dummy/app/controllers/application_controller.rb
static_blocks-1.0.1 spec/dummy/app/controllers/application_controller.rb
static_blocks-1.0.0 spec/dummy/app/controllers/application_controller.rb
static_blocks-0.1.1 spec/dummy/app/controllers/application_controller.rb
static_blocks-0.1.0 spec/dummy/app/controllers/application_controller.rb
static_blocks-0.0.5 spec/dummy/app/controllers/application_controller.rb
static_blocks-0.0.4 spec/dummy/app/controllers/application_controller.rb
static_blocks-0.0.3 spec/dummy/app/controllers/application_controller.rb
static_blocks-0.0.2 spec/dummy/app/controllers/application_controller.rb
static_blocks-0.0.1 spec/dummy/app/controllers/application_controller.rb