mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Don't evaluate ERB in the ujs test server
This commit is contained in:
parent
d71291cb3c
commit
b001cbefa7
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ class TestsController < ActionController::Base
|
||||||
data = { params: params.to_unsafe_h }.update(request.env)
|
data = { params: params.to_unsafe_h }.update(request.env)
|
||||||
|
|
||||||
if params[:content_type] && params[:content]
|
if params[:content_type] && params[:content]
|
||||||
render inline: params[:content], content_type: params[:content_type]
|
render plain: params[:content], content_type: params[:content_type]
|
||||||
elsif request.xhr?
|
elsif request.xhr?
|
||||||
if params[:with_xhr_redirect]
|
if params[:with_xhr_redirect]
|
||||||
response.set_header("X-Xhr-Redirect", "http://example.com/")
|
response.set_header("X-Xhr-Redirect", "http://example.com/")
|
||||||
|
|
Loading…
Reference in a new issue