Signed-off-by: Adrian Hinz <ahinz@voicetelecom.pl>

This commit is contained in:
Adrian Hinz 2017-06-28 14:02:11 +02:00
parent d73f52e73c
commit 60a5963828
2 changed files with 2 additions and 1 deletions

View File

@ -3,7 +3,7 @@ class ApplicationController < ActionController::Base
before_action :authenticate_user!
before_action :set_locale
layout :layout_by_resource
after_filter :set_headers
after_action :set_headers
def set_locale
I18n.locale = params[:lang] || I18n.default_locale

View File

@ -13,6 +13,7 @@ module InvoiceKeeper
# -- all .rb files in that directory are automatically loaded.
config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}').to_s]
config.i18n.default_locale = :pl
config.action_dispatch.default_headers.merge!({'X-Frame-Options' => 'ALLOWALL'})
config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'