1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

23 commits

Author SHA1 Message Date
Byron Bischoff
dbcbbcf2bc Show the user’s application in the source window and select the correct trace list, closes #17312 2014-10-23 09:53:43 -07:00
Akira Matsuda
b30b99c615 Expectations first 2014-08-18 15:40:53 +09:00
Yves Senn
171818c60c Merge pull request #16303 from rajcybage/removing_master
remove empty unused method
2014-07-28 17:22:53 +02:00
Rajarshi Das
f6a52f1e9d add comment to the empty each method for not removing it in future 2014-07-26 20:05:31 +05:30
Vlad Bokov
59dbf68960 Display diagnostics in text format for xhr request 2014-04-14 20:48:13 +07:00
Boris Kuznetsov
6af07c27ae Append link to bad code to backtrace when exception is SyntaxError 2014-03-27 00:36:59 +04:00
Guillermo Iguaran
f886fe2d8c Revert "Merge pull request #9660 from sebasoga/change_strong_parameters_require_behaviour"
This reverts commit c2b5a8e61b, reversing
changes made to 1918b12c04.

See: https://github.com/rails/rails/pull/9660#issuecomment-27627493
2013-11-02 14:30:03 -05:00
Guillermo Iguaran
c2b5a8e61b Merge pull request #9660 from sebasoga/change_strong_parameters_require_behaviour
Change ActionController::Parameters#require behavior when value is empty
2013-11-01 17:28:05 -07:00
Kir Shatrov
a725a453b3 Display exceptions in text format for xhr request 2013-08-22 22:20:34 +04:00
Lewis Marshall
ec462b4de7 Return a 405 response for unknown HTTP methods 2013-04-22 14:31:10 +01:00
Sebastian Sogamoso
b3f894c528 Change ActionController::Parameters#require behavior when value is empty
When the value for the required key is empty an ActionController::ParameterMissing is raised which gets caught by ActionController::Base and turned into a 400 Bad Request reply with a message in the body saying the key is missing, which is misleading.

With these changes, ActionController::EmptyParameter will be raised which ActionController::Base will catch and turn into a 400 Bad Request reply with a message in the body saying the key value is empty.
2013-03-11 09:28:22 -05:00
Brian Alexander
8e221127ab strong parameters exception handling 2013-01-15 17:45:34 -07:00
Yves Senn
80795e02ca display mountable engine routes on RoutingError. 2013-01-05 14:31:03 +01:00
Guillermo Iguaran
a27c4f6095 Fix test for DebugExceptions due to template change 2012-12-31 16:48:10 -05:00
schneems
0b6175ac2d Add Missing Keys from Journey on failed URL format
Many named routes have keys that are required to successfully resolve. If a key is left off like this:

    <%= link_to 'user', user_path %>

This will produce an error like this:

    No route matches {:action=>"show", :controller=>"users"}

Since we know that the :id is missing, we can add extra debugging information to the error message.

    No route matches {:action=>"show", :controller=>"users"} missing required keys: [:id]


This will help new and seasoned developers look closer at their parameters. I've also subclassed the routing error to be clear that this error is a result of attempting to generate a url and not because the user is trying to visit a bad url. 

While this may sound trivial this error message is misleading and confuses most developers. The important part isn't what's in the options its's what's missing. Adding this information to the error message will make debugging much more obvious. 

This is the sister pull request of https://github.com/rails/journey/pull/44 which will be required to get they missing keys into the correct error message. 

Example Development Error in Rails: http://cl.ly/image/3S0T0n1T3421
2012-08-28 08:53:45 -07:00
Andrew White
66eb3f02cc Raise ActionController::BadRequest for malformed parameter hashes.
Currently Rack raises a TypeError when it encounters a malformed or
ambiguous hash like `foo[]=bar&foo[4]=bar`. Rather than pass this
through to the application this commit captures the exception and
re-raises it using a new ActionController::BadRequest exception.

The new ActionController::BadRequest exception returns a 400 error
instead of the 500 error that would've been returned by the original
TypeError. This allows exception notification libraries to ignore
these errors if so desired.

Closes #3051
2012-05-20 19:07:04 +01:00
brainopia
73709f7ffa Removed unused assigns from ActionView::Template::Error
They existed since initial rails commit by DHH but lost use a long time
ago
2012-01-20 20:13:29 +04:00
Carlos Antonio da Silva
1ae9e60b8a Remove other old compatibility constants 2012-01-17 10:04:37 -02:00
Arun Agrawal
aa39149b2f Warning removed "warning: (...) interpreted as grouped expression" 2011-12-16 10:30:20 +05:30
José Valim
e3a4eb4b40 Close the response body on cascade pass, closes #3975. 2011-12-14 17:03:35 +01:00
Sergey Nartimov
081431fdf1 log exception backtrace when all backtrace lines silenced 2011-12-13 22:32:39 +03:00
José Valim
2ab2077235 Fix failing cascade exception. 2011-12-03 11:38:25 +01:00
José Valim
f9edc079e0 Split and improve show and debug exceptions middlewares. 2011-12-01 21:15:42 +01:00