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

21 commits

Author SHA1 Message Date
Xavier Noria
80e66cc4d9 normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
Xavier Noria
5b6eb1d58b modernizes hash syntax in actionpack 2016-08-06 19:35:13 +02:00
Xavier Noria
35b3de8021 applies new string literal convention in actionpack/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:54:50 +02:00
Andrew White
550c1f0950 Fix failing tests for #19474 2015-03-23 13:15:59 +00:00
Rafael Mendonça França
bb6fe7e73a Consistent usage of spaces in hashes across our codebase 2015-01-29 12:19:41 -02:00
Kir Shatrov
baf14ae513 Switch to kwargs in ActionController::TestCase and ActionDispatch::Integration
Non-kwargs requests are deprecated now.
Guides are updated as well.

`post url, nil, nil, { a: 'b' }` doesn't make sense.
`post url, params: { y: x }, session: { a: 'b' }` would be an explicit way to do the same
2015-01-29 14:44:46 +02:00
Earl J St Sauver
9ff18e4626
LOCALHOST definition should match any 127.0.0.0/8 address
The entire 127.0.0.0/8 range is assigned to the loopback address, not
only 127.0.0.0/24. This patch allows ActionDispatch::Request::LOCALHOST
to match any IPv4 127.0.0.0/8 loopback address.

The only place that the #local? method was previously under test was
in the show_expectations_test.rb file. I don't particularly like that
that's implicitly where this code is under test, and I feel like I
should move some of that testing code into the
test/dispatch/request_test.rb file, but I wanted some feedback first.

Credit goes to @sriedel for discovering the issue and adding the
patch.
2014-07-18 13:23:45 -04:00
Jeremy Kemper
5e03239d59 Fix that JSON and XML exception responses should give the HTTP error message for their status, by default, not the message from the underlying exception 2013-05-08 21:28:50 -07:00
Carlos Antonio da Silva
0c5552a3dd Fix typos in AP: "overriden" => "overridden" 2013-03-30 15:17:08 -03:00
Francesco Rodriguez
a53a7bea80 update documentation and code to use _action callbacks 2012-12-07 14:46:06 -05:00
Carlos Antonio da Silva
7fb536972e Add ensure block to make sure the state is properly restored 2012-11-04 19:50:56 -02:00
Steve Klabnik
561edbe71f Failsafe exception returns text/plain.
It's best to just return text/plain when something has gone terribly
wrong.

Fixes #5660.
2012-10-01 21:30:21 -07:00
Santiago Pastorino
0e06e8a692 This consider_all_requests_local doesn't make sense
This middleware is only for Public Exceptions.
This follows bd8c0b8a
2012-06-12 13:25:11 -03:00
Santiago Pastorino
bd8c0b8a7a Return proper format on exceptions 2012-06-11 18:07:30 -03:00
José Valim
654df86b7b Show detailed exceptions no longer returns true if the request is local in production. 2011-12-16 10:45:59 +01:00
José Valim
deef8dd682 Extract the rendering of public exceptions pages into a Rack app. 2011-12-16 10:45:59 +01:00
José Valim
26e7400cc5 Fix diagnostics page for routing errors. 2011-12-15 19:43:49 +01:00
José Valim
750bb5c865 Split ShowExceptions responsibilities in two middlewares. 2011-12-01 20:46:18 +01:00
kennyj
453f5534b4 Warnings removed. (ambiguous first argument) 2011-11-24 00:10:34 +09:00
lest
5bcd119b8d move show_detailed_exceptions? to Rescue module 2011-11-22 13:34:13 +03:00
lest
c6d6b28bb4 refactor show exceptions tests 2011-11-22 11:38:55 +03:00