aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 4359ee02e..63775a30f 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -1,7 +1,10 @@
class ApplicationController < ActionController::Base
- protect_from_forgery
+ # TODO : Delete hack to authorize Cross Request for js and json get request from javascript
+ protect_from_forgery unless: -> { request.get? && (request.format.json? || request.format.js?) }
before_filter :authenticate_user!
before_filter :set_locale
+
+ # Load helpers in rails engine
helper LanguageEngine::Engine.helpers
def set_locale