Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Try to escape each part of a path redirect route correctly | Andrew White | 2013-12-02 | 1 | -8/+25 |
| | | | | | | | | | | | | | A path redirect may contain any and all parts of a url which have different escaping rules for each part. This commit tries to escape each part correctly by splitting the string into three chunks - path (which may also include a host), query and fragment; then it applies the correct escape pattern to each part. Whilst using `URI.parse` would be better, unfortunately the possible presence of %{name} parameters in the path redirect string prevents us from using it so we have to use a regular expression instead. Fixes #13110. | ||||
* | Respect `SCRIPT_NAME` when using `redirect` with a relative path | Andrew White | 2013-10-10 | 1 | -0/+18 |
| | | | | | | | | | | | | | | | | Example: # application routes.rb mount BlogEngine => '/blog' # engine routes.rb get '/admin' => redirect('admin/dashboard') This now redirects to the path `/blog/admin/dashboard`, whereas before it would've generated an invalid url because there would be no slash between the host name and the path. It also allows redirects to work where the application is deployed to a subdirectory of a website. Fixes #7977 | ||||
* | Fix typos: the indefinite articles(a -> an) | SUGINO Yasuhiro | 2013-09-13 | 1 | -1/+1 |
| | |||||
* | Use merge! in some places to avoid creating extra hashes | Carlos Antonio da Silva | 2012-11-24 | 1 | -1/+1 |
| | |||||
* | Use get in the redirection doc examples | Carlos Antonio da Silva | 2012-11-09 | 1 | -7/+7 |
| | | | | | | | get is the most common usage, and match without an explicit verb was disallowed in 56cdc81c08b1847c5c1f699810a8c3b9ac3715a6. [ci skip] | ||||
* | 1.9 hash syntax changes to docs | AvnerCohen | 2012-10-31 | 1 | -4/+4 |
| | |||||
* | Return 400 Bad Request for URL paths with invalid encoding. | Andrew White | 2012-05-20 | 1 | -0/+9 |
| | | | | | | | | | Passing path parameters with invalid encoding is likely to trigger errors further on like `ArgumentError (invalid byte sequence in UTF-8)`. This will result in a 500 error whereas the better error to return is a 400 error which allows exception notification libraries to filter it out if they wish. Closes #4450 | ||||
* | Improve `rake routes` output for redirects - closes #6369. | Andrew White | 2012-05-19 | 1 | -12/+22 |
| | |||||
* | Fix inspecting route redirections, closes #6369 | Łukasz Strzałkowski | 2012-05-18 | 1 | -0/+4 |
| | | | | | | | | | | | | This commit fixes route inspection in `rake routes` Before: foo /foo(.:format) :controller#:action" After: foo /foo(.:format) Redirect (301) | ||||
* | use extract_options! | Paul McMahon | 2012-05-03 | 1 | -1/+2 |
| | |||||
* | Restore interpolation of path option in redirect routes | Andrew White | 2012-04-29 | 1 | -0/+10 |
| | |||||
* | Escape interpolated params when redirecting - fixes #5688 | Andrew White | 2012-04-29 | 1 | -1/+7 |
| | |||||
* | Fix formatting | Oscar Del Ben | 2012-04-18 | 1 | -2/+2 |
| | |||||
* | let's keep the slash in the return value instead of the path variable [ci skip] | Vijay Dev | 2012-04-18 | 1 | -2/+2 |
| | |||||
* | Warn about do end syntax in redirect option | Oscar Del Ben | 2012-04-17 | 1 | -0/+3 |
| | |||||
* | Fix redirect with block example | Alexey Vakhov | 2012-04-17 | 1 | -3/+3 |
| | |||||
* | Remove deprecation warnings from Action Pack. | José Valim | 2011-12-20 | 1 | -9/+0 |
| | |||||
* | Revert "make sure to require the right deprecation warning file" | Aaron Patterson | 2011-11-18 | 1 | -1/+0 |
| | | | | This reverts commit 9d725e3df502a07222f35576108eb2df2bd88259. | ||||
* | Refactoring the redirect method for the router api. | Aaron Patterson | 2011-11-18 | 1 | -25/+19 |
| | |||||
* | moving redirection to objects | Aaron Patterson | 2011-11-18 | 1 | -45/+58 |
| | |||||
* | remove the :path feature to redirects, since it cannot work | Aaron Patterson | 2011-11-18 | 1 | -15/+7 |
| | |||||
* | make sure to require the right deprecation warning file | Aaron Patterson | 2011-11-18 | 1 | -0/+1 |
| | |||||
* | arity check has been pushed up, so no need for proc wrapping | Aaron Patterson | 2011-11-18 | 1 | -1/+1 |
| | |||||
* | require that all blocks have arity of 2 | Aaron Patterson | 2011-11-18 | 1 | -5/+10 |
| | |||||
* | Added documentation explaining the new additional supported syntaxes for the ↵ | Josh Kalderimis | 2010-11-30 | 1 | -0/+29 |
| | | | | routing redirect method, a small changelog note, and two extra tests for path interpolation when using the hash option syntax. | ||||
* | The redirect routing method now allows for a hash of options which only ↵ | Josh Kalderimis | 2010-11-30 | 1 | -0/+81 |
changes the relevant parts of the url, or an object which responds to call can be supplied so common redirect rules can be easily reused. This commit includes a change where url generation from parts has been moved to AD::Http::URL as a class method. |