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:
committed by
voodoorai2000
parent
0011a0b4c7
commit
8c2f1b894d
@@ -1,6 +1,7 @@
|
||||
require "application_responder"
|
||||
|
||||
class ApplicationController < ActionController::Base
|
||||
include GlobalizeFallbacks
|
||||
include HasFilters
|
||||
include HasOrders
|
||||
include AccessDeniedHandler
|
||||
@@ -14,7 +15,6 @@ class ApplicationController < ActionController::Base
|
||||
before_action :track_email_campaign
|
||||
before_action :set_return_url
|
||||
before_action :set_current_user
|
||||
before_action :set_fallbacks_to_all_available_locales
|
||||
|
||||
check_authorization unless: :devise_controller?
|
||||
self.responder = ApplicationResponder
|
||||
@@ -124,8 +124,4 @@ class ApplicationController < ActionController::Base
|
||||
def set_current_user
|
||||
User.current_user = current_user
|
||||
end
|
||||
|
||||
def set_fallbacks_to_all_available_locales
|
||||
Globalize.set_fallbacks_to_all_available_locales
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user