aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/resources_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Missing or unneeded require extract_optionsAkira Matsuda2013-02-011-0/+1
|
* Extract common controllers to abstract_unitRafael Mendonça França2012-08-131-29/+0
|
* removes usage of Object#in? from the code base (the method remains defined ↵Xavier Noria2012-08-061-3/+3
| | | | | | | | | | | | | | | | | | | by Active Support) Selecting which key extensions to include in active_support/rails made apparent the systematic usage of Object#in? in the code base. After some discussion in https://github.com/rails/rails/commit/5ea6b0df9a36d033f21b52049426257a4637028d we decided to remove it and use plain Ruby, which seems enough for this particular idiom. In this commit the refactor has been made case by case. Sometimes include? is the natural alternative, others a simple || is the way you actually spell the condition in your head, others a case statement seems more appropriate. I have chosen the one I liked the most in each case.
* load active_support/core_ext/object/inclusion in active_support/railsXavier Noria2012-08-021-1/+0
|
* Raise Assertion instead of RoutingError for routing assertion failures.David Chelimsky2012-05-201-5/+5
| | | | | | | | | | | | | Before this change, assert_recognizes, assert_generates, and assert_routing raised ActionController::RoutingError when they failed to recognize the route. This commit changes them to raise Assertion instead. This aligns with convention for logical failures, and supports reporting tools that care about the difference between logical failures and errors e.g. the summary at the end of a test run. - Fixes #5899
* Remove default match without specified methodJose and Yehuda2012-04-241-2/+2
| | | | | | | | | | | | | | | | In the current router DSL, using the +match+ DSL method will match all verbs for the path to the specified endpoint. In the vast majority of cases, people are currently using +match+ when they actually mean +get+. This introduces security implications. This commit disallows calling +match+ without an HTTP verb constraint by default. To explicitly match all verbs, this commit also adds a :via => :all option to +match+. Closes #5964
* Add config.default_method_for_update to support PATCHDavid Lee2012-02-221-9/+16
| | | | | | | | | | | | | | | | PATCH is the correct HTML verb to map to the #update action. The semantics for PATCH allows for partial updates, whereas PUT requires a complete replacement. Changes: * adds config.default_method_for_update you can set to :patch * optionally use PATCH instead of PUT in resource routes and forms * adds the #patch verb to routes to detect PATCH requests * adds #patch? to Request * changes documentation and comments to indicate support for PATCH This change maintains complete backwards compatibility by keeping :put as the default for config.default_method_for_update.
* Remove rescue_action from compatibility module and testsCarlos Antonio da Silva2012-01-171-1/+0
|
* all routes can be stored in the Journey Routes objectAaron Patterson2011-09-121-1/+1
|
* Pull up a method we only use once.Aaron Patterson2011-09-081-5/+1
|
* Conditions must never be equalAaron Patterson2011-09-081-6/+1
|
* There is no need to be destructive with the passed-in options.thedarkone2011-07-281-0/+9
| | | | This fixes a bug that is caused by Resource/SingletonResource mangling resource options when using inline "multi"-resource declarations.
* Using Object#in? and Object#either? in various placesPrem Sichanugrist2011-04-111-3/+4
| | | | There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
* Cleanup deprecation warnings in Action ControllerCarlos Antonio da Silva2010-09-061-30/+0
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Remove a few tests from old router that do not make sense with the new one.José Valim2010-09-051-51/+3
|
* This test is invalid for new routerŁukasz Strzałkowski2010-09-051-20/+0
|
* raise error on invalid HTTP methods or :head passed with :via in routesPiotr Sarnacki2010-09-051-1/+1
|
* Implemented resources :foos, :except => :all optionPiotr Sarnacki2010-09-051-3/+9
|
* Fixed almost all resources testsPiotr Sarnacki2010-09-051-159/+213
|
* Removed deprecated RouteSet API, still many tests failPiotr Sarnacki2010-09-051-172/+168
|
* Revert "Setup explicit requires for files with exceptions. Removed them from ↵José Valim2010-09-021-1/+0
| | | | | | | | autoloading." Booting a new Rails application does not work after this commit [#5359 state:open] This reverts commit 38a421b34d0b414564e919f67d339fac067a56e6.
* Setup explicit requires for files with exceptions. Removed them from ↵Łukasz Strzałkowski2010-09-021-0/+1
| | | | | | autoloading. Signed-off-by: José Valim <jose.valim@gmail.com>
* object/try should be required after abstract_unit to have AS in the load pathSantiago Pastorino2010-08-141-1/+1
|
* adds missing requires for Object#tryXavier Noria2010-08-091-0/+1
|
* Consistent routing languageJoshua Peek2010-03-301-7/+7
|
* Don't force singularization of singleton resource names, e.g. /preferences ↵Andrew White2010-03-151-0/+7
| | | | | | [#4089 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* If IntegrationSession is initialized with an objects that responds to ↵Carlhuda2010-02-261-1/+0
| | | | #routes, automatically extend the URL helpers from the RouteSet onto it
* Rename named_url_helpers to url_helpers and url_helpers to url_forCarlhuda2010-02-261-2/+2
|
* Rename metaclass to singleton_classCarlhuda2010-02-251-2/+2
|
* WIP: Remove the global routerCarlhuda2010-02-251-5/+8
|
* Remove ActionController::Base.resources_path_namesCarl Lerche2010-02-241-9/+10
|
* Use ActionDispatch::Routing everywhereMartin Schürrer2010-02-211-2/+2
|
* Respect resources_path_names and :path_names options in new dslJoshua Peek2010-01-131-21/+21
|
* optimise_named_routes is unnecessaryJoshua Peek2010-01-131-10/+0
|
* Remove fancy method not allowed resource exceptions since they areJoshua Peek2009-12-111-4/+4
| | | | too much of a hack
* New routing dslJoshua Peek2009-10-201-10/+10
|
* Group together all the old routing dsl logicJoshua Peek2009-10-201-5/+5
|
* Move Routing into ADJoshua Peek2009-10-201-6/+6
|
* Rewrite resource routing tests that are coupled to the router implementationJoshua Peek2009-09-131-2/+3
|
* Added both the documentation and a test case for the collection path name ↵Hugo Peixoto2009-08-091-0/+44
| | | | | | | | customization feature. [#1218 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Added routing test for irregular ID requirements and custom member action.Ruy Asan2009-05-011-0/+8
| | | | | | [#2595 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Fix requirements for additional member/collection routes [#2054 state:resolved]Mike Gunderloy2009-03-141-0/+26
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Revert 5b7527ca "Failing test for routes with member & requirement" [#2054 ↵Joshua Peek2009-03-131-8/+0
| | | | state:wontfix]
* Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.Jeremy Kemper2009-03-081-6/+6
| | | | [#1617 state:resolved]
* Ensure shallow routes respects namespace [#1356 state:resolved]Tom Stuart2009-03-071-3/+31
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Failing test for routes with member & requirement [#2054 state:resolved]Mike Gunderloy2009-03-051-0/+8
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Allow routes with a trailing slash to be recognizedMike Gunderloy2009-03-041-2/+10
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#2039 state:committed]
* Removed map.resources :only/:except inheritanceTarmo Tänav2009-02-011-15/+28
| | | | | | | | | | It's very rare for these options to apply identically to nested child resources, and with this inheritance on it's very difficult to have a child resource with more actions than the parent. This reverts commit 2ecec6052f7f290252a9fd9cc27ec804c7aad36c. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1826 state:committed]
* Added optimal formatted routes to rails, deprecating the formatted_* ↵Aaron Batalion2008-11-261-9/+9
| | | | | | methods, and reducing routes creation by 50% [#1359 state:committed] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* Test default singleton resource route to ensure it uses GET. This is ↵Geoff Garside2008-11-241-0/+10
| | | | | | important if using map.root :resource instead of map.root :resources for some reason. Signed-off-by: Michael Koziarski <michael@koziarski.com>