aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
Commit message (Collapse)AuthorAgeFilesLines
* Add support for optional root segments containing slashesAndrew White2012-07-171-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optional segments with a root scope need to have the leading slash outside of the parentheses, otherwise the generated url will be empty. However if the route has non-optional elements then the leading slash needs to remain inside the parentheses otherwise the generated url will have two leading slashes, e.g: Blog::Application.routes.draw do get '/(:category)', :to => 'posts#index', :as => :root get '/(:category)/author/:name', :to => 'posts#author', :as => :author end $ rake routes root GET /(:category)(.:format) posts#index author GET (/:category)/author/:name(.:format) posts#author This change adds support for optional segments that contain a slash, allowing support for urls like /page/2 for the root path, e.g: Blog::Application.routes.draw do get '/(page/:page)', :to => 'posts#index', :as => :root end $ rake routes root GET /(page/:page)(.:format) posts#index Fixes #7073 (cherry picked from commit d8745decaf59aad32aa2f09abdba99b8d0e48b31)
* Array parameters should not contain nil values.Aaron Patterson2012-06-111-0/+4
|
* Strip [nil] from parameters hash.Aaron Patterson2012-05-301-1/+6
| | | | | | Thanks to Ben Murphy for reporting this! CVE-2012-2660
* Don't ignore nil positional arguments for url helpers - fixes #6196.Andrew White2012-05-101-0/+34
|
* Reset the request parameters after a constraints checkAndrew White2012-05-031-0/+19
| | | | | | | | | | | | | | A callable object passed as a constraint for a route may access the request parameters as part of its check. This causes the combined parameters hash to be cached in the environment hash. If the constraint fails then any subsequent access of the request parameters will be against that stale hash. To fix this we delete the cache after every call to `matches?`. This may have a negative performance impact if the contraint wraps a large number of routes as the parameters hash is built by merging GET, POST and path parameters. Fixes #2510. (cherry picked from commit 56030506563352944fed12a6bb4793bb2462094b)
* Restore interpolation of path option in redirect routesAndrew White2012-04-291-1/+40
|
* Escape interpolated params when redirecting - fixes #5688Andrew White2012-04-291-0/+28
|
* Fix the redirect when it receive blocks with arity of 1.Rafael Mendonça França2012-03-311-0/+15
| | | | Closes #5677
* fix ArgumentError being raised in case of invalid byte sequencesMichael Reinsch2012-03-081-0/+4
|
* Fix some warnings on 3-2-stablekennyj2012-02-211-1/+0
|
* Remove fixture files with Windows incompatible filenamesAndrew White2012-02-201-27/+88
| | | | | | Windows doesn't allow `\ / : * ? " < > |` in filenames so create the fixture files at runtime and ignore the incompatible ones when running on Windows.
* Fix ActionDispatch::Static to serve files with unencoded PCHARAndrew White2012-02-171-0/+28
| | | | | | | | | | | RFC 3986[1] allows sub-delim characters in path segments unencoded, however Rack::File requires them to be encoded so we use URI's unescape method to leave them alone and then escape them again. Also since the path gets passed to Dir[] we need to escape any glob characters in the path. [1]: http://www.ietf.org/rfc/rfc3986.txt
* backporting #4918 to 3.2 stable; adding extra test for accept header given ↵Aditya Sanghi2012-02-171-0/+12
| | | | by googlebot
* Merge pull request #4988 from kennyj/fix_4720-3Aaron Patterson2012-02-101-0/+26
| | | | Fix GH #4720. Routing problem with nested namespace and already camelized controller option.
* Merge pull request #4908 from kennyj/fix_3864José Valim2012-02-061-0/+33
| | | | Fix url_for method's behavior. GH #3684.
* Merge pull request #4879 from kennyj/fix_4873José Valim2012-02-041-0/+6
| | | | Fix GH #4873. Allow swapping same class middleware.
* Test for unicode path supportPaul McMahon2012-01-251-0/+20
| | | | This is currently broken due to a bug in journey.
* Deprecate AC::UnknownError and AC::DoubleRenderErrorCarlos Antonio da Silva2012-01-172-3/+3
| | | | | Use the constants AbstractController::ActionNotFound and AbstractController::DoubleRenderError respectively instead.
* Merge pull request #4462 from spohlenz/fix-routing-testsAaron Patterson2012-01-161-0/+4
| | | | Stub ip method of alternative request class in router tests
* Use a BodyProxy instead of including a Module that responds to close.Santiago Pastorino2012-01-131-1/+12
| | | | Closes #4441 if Active Record is disabled assets are delivered correctly
* Add original_fullpath and original_url methods to RequestPiotr Sarnacki2012-01-101-0/+24
|
* Override respond_to? since we are also overriding method_missing.José Valim2012-01-031-0/+7
|
* deprecate ActiveSupport::Base64Sergey Nartimov2012-01-031-4/+4
| | | | extend and define ::Base64 if needed
* last named route wins. fixes #4164Aaron Patterson2011-12-281-1/+1
| | | | | | This differs from route recognition where first recognized route wins. This will not be supported in Rails 4.0 so that route recognition and generation rules are consistent.
* adding tests for #4029Aaron Patterson2011-12-191-1/+1
|
* Add test for register_aliasJustin Campbell2011-12-171-0/+9
|
* Add test for type aliasesJustin Campbell2011-12-171-0/+11
|
* Allow symbols to be passed for extension aliasesJustin Campbell2011-12-171-0/+11
|
* Do not raise an exception if an invalid route was generated automatically.José Valim2011-12-161-0/+1
|
* ShowExceptions should understand X-Cascade responses from exceptions app.José Valim2011-12-161-0/+11
|
* Improve the specs on exceptions app.José Valim2011-12-161-1/+14
|
* Extract the rendering of public exceptions pages into a Rack app.José Valim2011-12-161-1/+1
|
* Get rid of the close checks since we cannot reliably close the session anyway.José Valim2011-12-161-97/+1
|
* Warning removed "warning: (...) interpreted as grouped expression"Arun Agrawal2011-12-161-1/+1
|
* Close the response body on cascade pass, closes #3975.José Valim2011-12-141-3/+22
|
* log exception backtrace when all backtrace lines silencedSergey Nartimov2011-12-131-0/+13
|
* Fix failing AP tests.José Valim2011-12-131-1/+1
|
* use Array#join so that file encoding doesn't impact returned string.Aaron Patterson2011-12-121-0/+9
| | | | Fixes #3957
* Speed up development by only reloading classes if dependencies files changed.José Valim2011-12-121-0/+9
| | | | | | | | This can be turned off by setting `config.reload_classes_only_on_change` to false. Extensions like Active Record should add their respective files like db/schema.rb and db/structure.sql to `config.watchable_files` if they want their changes to affect classes reloading. Thanks to https://github.com/paneq/active_reload and Pastorino for the inspiration. <3
* Allow reloader to be configured.José Valim2011-12-121-0/+13
|
* Use default charset when we read content type without charset.kennyj2011-12-071-0/+11
|
* Fix failing cascade exception.José Valim2011-12-031-0/+9
|
* Remove unnecessary test setup.José Valim2011-12-011-6/+1
|
* Split and improve show and debug exceptions middlewares.José Valim2011-12-012-76/+130
|
* Split ShowExceptions responsibilities in two middlewares.José Valim2011-12-011-2/+2
|
* put backtrace_cleaner to envlest2011-11-281-0/+7
|
* middlewares should use logger from envlest2011-11-253-20/+19
|
* configuration option to always write cookielest2011-11-231-2/+2
|
* Remove unreachable code, and add additional testcases.kennyj2011-11-242-0/+24
|
* refactor show exceptions testslest2011-11-221-42/+19
|