diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-02-07 09:26:27 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-02-07 09:26:27 +0000 |
commit | 3d64938adcd4dd9372c0a47aa4f03b065d088279 (patch) | |
tree | 5e42632d90c5120d6f8c5481f1de9bb540b925d2 /app/controllers/application_controller.rb | |
parent | 171581da7e5301470d72efc91e713c375290d7b8 (diff) | |
download | redmine-3d64938adcd4dd9372c0a47aa4f03b065d088279.tar.gz redmine-3d64938adcd4dd9372c0a47aa4f03b065d088279.zip |
Adds JS response support to #render_error (#15760).
git-svn-id: http://svn.redmine.org/redmine/trunk@12855 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index b297aa738..8060c9e96 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -431,6 +431,10 @@ class ApplicationController < ActionController::Base format.html { render :template => 'common/error', :layout => use_layout, :status => @status } + format.js { + # Can't use an error status here, browsers wouldn't execute the JS response + render :template => 'common/error', :layout => false, :status => 200 + } format.any { head @status } end end |