aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/resources_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* MiniTest compat: don't check for test/unit's assertion in particularJeremy Kemper2008-11-221-1/+1
|
* Merge branch 'master' into testingJeremy Kemper2008-11-151-0/+266
|\
| * Make inheritance of map.resources :only/:except options behave more predictablyTom Stuart2008-11-141-0/+26
| | | | | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
| * Fix map.resources to always generate named routes if they're neededTom Stuart2008-11-131-0/+78
| | | | | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
| * Add :only/:except options to map.resourcesTom Stuart2008-11-121-0/+162
| | | | | | | | | | | | | | This allows people with huge numbers of resource routes to cut down on the memory consumption caused by the generated code. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1215 state:committed]
* | Move controller assertions from base TestCase to AC:: and AV::TestCaseJeremy Kemper2008-11-071-1/+1
|/
* Add support for shallow nesting of routes. [#838 state:resolved]Pratik Naik2008-08-301-25/+109
| | | | | | | | | | | | | | | | | | Adds :shallow option to resource route definition. If true, paths for nested resources which reference a specific member (ie. those with an :id parameter) will not use the parent path prefix or name prefix. Example : map.resources :users, :shallow => true do |user| user.resources :posts end * GET /users/1/posts (maps to PostsController#index action as usual) named route "user_posts" is added as usual. * GET /posts/2 (maps to PostsController#show action as if it were not nested) Additionally, named route "post" is added too.
* Accept an array of method symbols for collection/member actions of resourcesBrennan Dunn2008-08-281-0/+13
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Raise ArgumentError if an invalid method is specified as part of a route's ↵Tom Ward2008-07-181-0/+20
| | | | | | conditions. Also raise an error if HEAD is specified as the method, as rails routes all HEAD requests through the equivalent GET, though doesn't return the response body [#182 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Fixed teardown method typo (plus whitespace)Joshua Peek2008-07-111-17/+15
|
* Refactored and fixed Resources.map_member_actions to make use of custom ↵Marcos Arias2008-05-061-4/+26
| | | | | | | ActionController::Base.resources_path_names when the option :path_names is not directly specified. Added a specific test for this functionality and fixed assert_restful_routes_for test helper to make use of ActionController::Base.resources_path_names instead of just "new" or "edit". Signed-off-by: Michael Koziarski <michael@koziarski.com> [#111 state:resolved]
* Make sure member names aren't mistakenly set to nil when providing :path_namesEugene Pimenov2008-04-231-7/+38
| | | | | | [#19 state:resolved] Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Allow alternative values for the 'new' and 'edit' actions in resourceful routes.Michael Koziarski2008-04-121-0/+6
| | | | | | map.resource :schools, :as => 'escuelas', :path_names => { :new => 'nueva' } Closes #11181. [ivanvr]
* Introduce map.resources :cards, :as => 'tarjetas' to use a custom resource ↵Jeremy Kemper2008-02-021-5/+34
| | | | | | name in the URL: cards_path == '/tarjetas'. Closes #10578. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8785 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* require abstract_unit directly since test is in load pathJeremy Kemper2008-01-051-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Move ActionController::Routing.optimise_named_routes to ↵Rick Olson2007-10-031-2/+2
| | | | | | | | ActionController::Base.optimise_named_routes. Now you can set it in the config. ActionController::Routing::DynamicSegment#interpolation_chunk should call #to_s on all values before calling URI.escape. [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7724 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that resource namespaces wouldnt stick to all nested resources (closes ↵David Heinemeier Hansson2007-09-101-0/+32
| | | | | | #9399) [pixeltrix] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7447 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Optimise named route generation when using positional arguments. Closes ↵Michael Koziarski2007-09-091-0/+12
| | | | | | | | | | | | #9450 [Koz] This change delivers significant performance benefits for the most common usage scenarios for modern rails applications by avoiding the costly trip through url_for. Initial benchmarks indicate this is between 6 and 20 times as fast. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7421 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove deprecated named routes [pixeltrix]Tobias Lütke2007-09-061-49/+55
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7415 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow you to set custom :conditions on resource routes. [Rick]Rick Olson2007-07-251-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7234 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Prefix nested resource named routes with their action name, e.g. ↵Jeremy Kemper2007-06-271-33/+132
| | | | | | new_group_user_path(@group) instead of group_new_user_path(@group). The old nested action named route is deprecated in Rails 1.2.4. Closes #8558. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7138 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Routing: map.resource :logo routes to LogosController so the controller may ↵Jeremy Kemper2007-06-011-12/+12
| | | | | | be reused for multiple nestings or namespaces. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6922 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Routing: respond with 405 Method Not Allowed status when the route path ↵Jeremy Kemper2007-05-261-3/+3
| | | | | | matches but the HTTP method does not. Closes #6953. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6862 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Strip junk whitespace from [6806].Jeremy Kemper2007-05-221-19/+19
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6807 5ecf4fe2-1ee6-0310-87b1-e25e094e27de