| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
Avoid logic in ERB and use helpers
|
| |
|
|
|
|
|
|
|
|
|
| |
This will help you debug missing template errors, especially if they
come from a programmatic template selection. Thanks to @dhh for
suggesting that.
As a bonus, also show request and response info on the routing error
page for consistency.
|
|
|
|
|
| |
It returns multiple source extracts since 1ed264bc. Also cleaned its
result structure, as we no longer need the file in a code extract.
|
|
|
|
|
|
| |
Those three can be nil when exception backtrace is nil. This happens and
that forced a couple of nil guards in the code. I'm proposing to make
those always return an array, even on nil backtrace.
|
|
|
|
| |
trace list, closes #17312
|
|
|
|
|
|
| |
Hash#keys.each allocates an array of keys; Hash#each_key iterates through the
keys without allocating a new array. This is the reason why Hash#each_key
exists.
|
| |
|
|
|
|
|
|
| |
Provide the ability to extract the source code of the entire exception stack
trace, not just the frame raising the error. This improves debugging
capability of the error page, especially for framework-related errors.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
It'd be a nice convention to mark the unused variables like this, now that Ruby 2 will issue no warnings for such vars being unused.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
It feels more consistent to have this class called "HtmlTableFormatter",
and to have it here with the routes inspector and console formatter,
since it's used for both routing error exceptions and the rails info
page.
|
| |
|
| |
|
| |
|
|
|
|
| |
It is automatically applied when strings is unsafe for html.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* <pre> is not allowed to be nested inside of <p> elements in HTML
* Indentation of </p> doesn't match corresponding <p>
* <p> element not explicitly closed
* One more </div> than <div>
In each case, the template was fixed to match how a HTML5 parser would "see"
the resulting page.
|
|\
| |
| | |
Allow toggling dumps on error page
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
When someone gets a routing exception, the routes are rendered (starting in Rails 4.0). This PR brings parity between the html routes in the `rails/info/routes` path and when rendered from an exception. This is the continuation of #8521 which brought html formatted routes.
In addition to bringing parity to the two views, we're keeping our views DRY by rendering off of the same partials. In this case Railties depends on partials provided by ActionDispatch. I'm open to alternative implementations. Ideally both views will use the same code so any improvements or updates to it will be reproduced on both.
<hr />
![](http://f.cl.ly/items/3O1D0K1v0j0i343O3T3T/Screen%20Shot%202012-12-17%20at%203.07.20%20PM.png)
|
| |
|
|
|
|
| |
If someone receives a routing error, they likely need to view the routes. Rather than making them visit '/rails/info/routes' or run `rake routes` we can give them that information on the page.
|
|
|
|
|
|
|
|
|
|
| |
SessionStore was recently changed to delegate to hash
object instead of inherit from it. Since we don't want
to extend SessionStore with every method implemented in
Hash, it's better to just convert any object passed to
debug_hash (which is also better as we don't require
to pass Hash instance there, it can be any object that
can be converted to Hash).
|
|
|
|
|
|
| |
If a user gets a routing error due to a view helper such as using user_path without an :id they must go to their logs to see the backtrace. By adding in the trace template, a user can see which line the error occurred on without leaving the browser.
When a routing error occurs outside of the view the application trace will be blank and will not confuse developers.
|
|
|
|
|
|
| |
When a newcomer hits the routing error page they
are often confused about how to trouble shoot the
next step. Adding a simple help text can gently
remind coders where to get more help.
|
|
|
|
|
|
|
|
|
| |
Using the white-space: pre-wrap adds extra line breaks to prevent the text from breaking out of the element's box. In this case single line output can be extremely long, breaking out the <body> element.
See for reference: http://www.quirksmode.org/css/whitespace.html
Before: http://link.olivierlacan.com/BVU4
After: http://link.olivierlacan.com/BUfM
|
| |
|
|
|
|
| |
crap) [DHH]
|
|
|
|
| |
font choices for Mac users.
|
|
|
|
|
|
| |
template, test included
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|