Add controller concern to initialize Globalize fallbacks

Ensure to initialize all requests including this concern into all
application base controllers.
This commit is contained in:
Senén Rodero Rodríguez
2019-04-05 16:05:05 +02:00
committed by voodoorai2000
parent 0011a0b4c7
commit 8c2f1b894d
4 changed files with 16 additions and 5 deletions

View File

@@ -0,0 +1,13 @@
module GlobalizeFallbacks
extend ActiveSupport::Concern
included do
before_action :initialize_globalize_fallbacks
end
private
def initialize_globalize_fallbacks
Globalize.set_fallbacks_to_all_available_locales
end
end