diff options
author | Alex Legler <a3li@gentoo.org> | 2012-08-24 21:45:57 +0200 |
---|---|---|
committer | Alex Legler <a3li@gentoo.org> | 2012-08-24 21:45:57 +0200 |
commit | e2530f6b284504e7c6bb801f5e2ad9488953836b (patch) | |
tree | f2f8015d4cbdd4b130b282a678e9a1f1af93ad0a /app | |
parent | Bugs controller: Explicitly render JavaScript using respond_to (diff) | |
download | glsamaker-e2530f6b284504e7c6bb801f5e2ad9488953836b.tar.gz glsamaker-e2530f6b284504e7c6bb801f5e2ad9488953836b.tar.bz2 glsamaker-e2530f6b284504e7c6bb801f5e2ad9488953836b.zip |
Comments controller: Explicitly render JavaScript using respond_to
This might be a new 'Feature' or bug.
Without this change, the Accept: header of an AJAX request was discarded and text/html returned.
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/comments_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index d4aaa27..d3ef31d 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -60,6 +60,11 @@ class CommentsController < ApplicationController else @error = "Error: Cannot find GLSA" end + + respond_to do |format| + format.html { render :status => 500 } + format.js + end end def show |