aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #6588 from nbibler/polymorphic_to_modelJosé Valim2012-06-011-1/+7
|\ | | | | Correct the use of to_model in polymorphic routing
| * Use to_model delegates for polymorphic route generationNathaniel Bibler2012-06-011-1/+7
| |
* | Include routes.mounted_helpers into integration testsPiotr Sarnacki2012-06-011-2/+5
|/ | | | | | | | | | | | | | | In integration tests, you might want to use helpers from engines that you mounted in your application. It's not hard to add it by yourself, but it's unneeded boilerplate. mounted_helpers are now included by default. That means that given engine mounted like: mount Foo::Engine => "/foo", :as => "foo" you will be able to use paths from this engine in tests this way: foo.root_path #=> "/foo" (closes #6573)
* Strip [nil] from parameters hash.Aaron Patterson2012-05-301-0/+22
| | | | | | Thanks to Ben Murphy for reporting this! CVE-2012-2660
* remove unnecessary memcache equire in ActionDispatch::Session::CacheStoreBrian Durand2012-05-261-1/+0
|
* Don't ignore nil positional arguments for url helpers - fixes #6196.Andrew White2012-05-101-1/+1
|
* Refactor the handling of default_url_options in integration testsAndrew White2012-05-101-7/+24
| | | | | | | | | | | | This commit improves the handling of default_url_options in integration tests by making behave closer to how a real application operates. Specifically the following issues have been addressed: * Options specified in routes.rb are used (fixes #546) * Options specified in controllers are used * Request parameters are recalled correctly * Tests can override default_url_options directly
* Reset the request parameters after a constraints checkAndrew White2012-05-032-0/+6
| | | | | | | | | | | | | | 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)
* fix the Flash middleware loading the session on every request (very ↵Will Bryant2012-04-301-6/+3
| | | | dangerous especially with Rack::Cache), it should only be loaded when the flash method is called
* Restore interpolation of path option in redirect routesAndrew White2012-04-291-0/+10
|
* Add missing require from b608cdd64c95d0d16eb98d86562e22f3b01be9e3Andrew White2012-04-291-0/+1
|
* Escape interpolated params when redirecting - fixes #5688Andrew White2012-04-291-1/+6
|
* Fix the redirect when it receive blocks with arity of 1.Rafael Mendonça França2012-03-311-1/+2
| | | | Closes #5677
* Remove the leading \n added by textarea on assert_selectSantiago Pastorino2012-03-301-0/+1
|
* Return the same session data object when setting session idCarlos Antonio da Silva2012-03-241-1/+1
| | | | | | | | Make sure to return the same hash object instead of returning a new one. Returning a new one causes failures on cookie store tests, where it tests for the 'Set-Cookie' header with the session signature. This is due to the hash ordering changes on Ruby 1.8.7-p358.
* Merge pull request #5456 from brianmario/redirect-sanitizationAaron Patterson2012-03-151-1/+1
| | | | Strip null bytes from Location header
* fix ArgumentError being raised in case of invalid byte sequencesMichael Reinsch2012-03-081-0/+1
|
* Turn off verbose mode of rack-cache, we still have X-Rack-Cache to check ↵Santiago Pastorino2012-03-031-1/+1
| | | | | | that info Closes #5245
* Fix typo in match :to docsJustin Woodbridge2012-02-251-1/+1
|
* Avoid inspecting the whole route set, closes #1525José Valim2012-02-231-0/+6
|
* Merge pull request #5084 from johndouthat/patch-1Aaron Patterson2012-02-221-2/+1
| | | | Remove reference to rails_legacy_mapper, which isn't compatible with 3.2...
* Simplify regexpAndrew White2012-02-171-1/+1
|
* Fix ActionDispatch::Static to serve files with unencoded PCHARAndrew White2012-02-171-2/+10
| | | | | | | | | | | 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-1/+3
| | | | by googlebot
* Merge pull request #4988 from kennyj/fix_4720-3Aaron Patterson2012-02-101-0/+5
| | | | Fix GH #4720. Routing problem with nested namespace and already camelized controller option.
* Fixed force_ssl redirects to include original query paramsRyan McGeary2012-02-061-0/+1
| | | | | | `ActionController.force_ssl` redirects http URLs to their https equivalent; however, when a URL contains a query string, the resulting redirect lacked the original query string.
* Merge pull request #4908 from kennyj/fix_3864José Valim2012-02-061-1/+1
| | | | Fix url_for method's behavior. GH #3684.
* Merge pull request #4879 from kennyj/fix_4873José Valim2012-02-041-2/+3
| | | | Fix GH #4873. Allow swapping same class middleware.
* Added custom regexps to ASTs that have literal nodes on either side ofAaron Patterson2012-01-231-1/+20
| | | | symbol nodes. Fixes #4585
* Add default charset config to ActionDispatchCarlos Antonio da Silva2012-01-171-1/+2
|
* Add begin/ensure block since we are returning.José Valim2012-01-141-3/+5
|
* Use a BodyProxy instead of including a Module that responds to close.Santiago Pastorino2012-01-132-14/+31
| | | | Closes #4441 if Active Record is disabled assets are delivered correctly
* Add original_fullpath and original_url methods to RequestPiotr Sarnacki2012-01-101-0/+8
|
* Revert "Named Routes shouldn't override existing ones (currently route ↵Aaron Patterson2012-01-031-1/+1
| | | | | | recognition goes with the earliest match, named routes use the latest match)" This reverts commit 71d769e3b58cb56b4b1d5143936c65be8b27c490.
* Override respond_to? since we are also overriding method_missing.José Valim2012-01-031-0/+4
|
* Documented about using :path option for resourcesKevin Moore2011-12-291-0/+7
|
* Correctly display rack apps with dynamic constraints in RoutesInspectorPiotr Sarnacki2011-12-261-1/+1
| | | | | | | | | | | | | If you used dynamic constraint like that: scope :constraint => MyConstraint.new do mount RackApp => "/foo" end routes were not displayed correctly when using `rake routes`. This commit fixes it. If you want nice display of dynamic constraints in `rake routes` output, please just override to_s method in your constraint's class.
* add help text to routing errorschneems2011-12-171-8/+13
| | | | | | 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.
* Allow symbols to be passed for extension aliasesJustin Campbell2011-12-171-1/+1
|
* Do not raise an exception if an invalid route was generated automatically.José Valim2011-12-161-3/+11
|
* ShowExceptions should understand X-Cascade responses from exceptions app.José Valim2011-12-163-6/+16
|
* Improve the specs on exceptions app.José Valim2011-12-161-1/+6
|
* Extract the rendering of public exceptions pages into a Rack app.José Valim2011-12-162-33/+48
|
* Get rid of the close checks since we cannot reliably close the session anyway.José Valim2011-12-164-27/+0
|
* Remove autoload for non-existent file.Uģis Ozols2011-12-151-1/+0
|
* Close the response body on cascade pass, closes #3975.José Valim2011-12-141-0/+2
|
* Fix url_for options[:subdomain] to allow objects as valueschoonkeat2011-12-141-1/+1
| | | | * e.g. blog_url(subdomain: current_user) instead of blog_url(subdomain: current_user.to_param)
* log exception backtrace when all backtrace lines silencedSergey Nartimov2011-12-131-1/+4
|
* use Array#join so that file encoding doesn't impact returned string.Aaron Patterson2011-12-121-3/+3
| | | | Fixes #3957
* Allow reloader to be configured.José Valim2011-12-121-14/+38
|