| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
This is not a security issue since this page is not present in
production and user have to type something in the field but is better to
escape the input.
|
| |
|
|
|
|
| |
- also refactored the javascript.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
When debugging routes ,it can sometimes be difficult to understand exactly how the paths are matched. This PR adds a JS based path matching widget to the `/rails/info/routes` output. You can enter in a path, and it will tell you which of the routes that path matches, while preserving order (top match wins).
The matching widget in action:
![](http://f.cl.ly/items/3A2F0v2m3m1Z1p3P3O3k/path-match.gif)
Prior to this PR the only way to check matching paths is via mental math, or typing in a path in the url bar and seeing where it goes. This feature will be an invaluable debugging tool by dramatically decreasing the time needed to check a path match.
ATP actionpack
|
|
|
|
|
|
| |
It is used by the table formatter only, and it's already inside a routes
directory that namespaces it properly, so calling it just "table" seems
simpler.
|
|
|
|
|
|
|
| |
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
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Remove/add ; where necessary, fix indentation.
|
|
|
|
|
|
|
|
|
| |
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
|