diff options
author | Tijmen Brommet <tijmen@gmail.com> | 2015-11-03 21:26:59 +0000 |
---|---|---|
committer | Tijmen Brommet <tijmen@gmail.com> | 2015-11-03 22:13:10 +0000 |
commit | 08689a2d1f0165f353f62ef4626e87fe841ec735 (patch) | |
tree | e4e3fe9446164dc6c98daa6c8b3b2f9380fe27bc /activejob/CHANGELOG.md | |
parent | e37b470a6675a05df5a57455a3ac8c1c88ef04d6 (diff) | |
download | rails-08689a2d1f0165f353f62ef4626e87fe841ec735.tar.gz rails-08689a2d1f0165f353f62ef4626e87fe841ec735.tar.bz2 rails-08689a2d1f0165f353f62ef4626e87fe841ec735.zip |
Add text template for source code
When a request is made with AJAX and an error occurs, Rails will render
a text-template for the exception instead of the HTML error page
(#11960).
The `.text.erb` variant of the `_source` template is currently missing,
causing HTML to be rendered in the response. This commit adds the text
template.
To keep the page scannable we only only show the first three source
extracts.
Related to #14745.
Before:
```
~/testing-exceptions ᐅ curl 'http://localhost:3000/' -H
'X-Requested-With: XMLHttpRequest'
RuntimeError in PostsController#index
<div class="source " id="frame-source-0">
<div class="info">
Extracted source (around line <strong>#3</strong>):
</div>
<div class="data">
<table cellpadding="0" cellspacing="0" class="lines">
<tr>
```
After:
```
~/testing-exceptions ᐅ curl 'http://localhost:3000/' -H
'X-Requested-With: XMLHttpRequest'
RuntimeError in PostsController#index
Extracted source (around line #3):
*3 raise
```
Diffstat (limited to 'activejob/CHANGELOG.md')
0 files changed, 0 insertions, 0 deletions