Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge pull request #18665 from sgrif/sg-test-route-all | Sean Griffin | 2015-02-20 | 1 | -0/+22 |
|\ | | | | | Allow `method: "all"` as a valid routing test option | ||||
| * | Allow `method: "all"` as a valid routing test option | Sean Griffin | 2015-01-23 | 1 | -0/+22 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the test to mirror the production code, since `via: :all` is a valid option. The behavior in 4.1 did not actually test that it matched all verbs, but instead defaulted to testing for "GET". This implementation aims to better handle the intention of passing "all". What will actually be asserted doesn't quite match up with the generated route, since it appears to just not create a constraint on the method. However, I don't think that we can easily test the lack of that constraint. Testing each of the main 4 HTTP verbs seems to be a reasonably close approximation, which should be sufficient for our needs. Fixes #18511. | ||||
* | | Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846 | robertomiranda | 2015-01-31 | 1 | -2/+2 |
| | | | | | | | | ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769 | ||||
* | | Switch to kwargs in ActionController::TestCase and ActionDispatch::Integration | Kir Shatrov | 2015-01-29 | 1 | -2/+2 |
|/ | | | | | | | | Non-kwargs requests are deprecated now. Guides are updated as well. `post url, nil, nil, { a: 'b' }` doesn't make sense. `post url, params: { y: x }, session: { a: 'b' }` would be an explicit way to do the same | ||||
* | Use Hash#each_key instead of Hash#keys.each | Erik Michaels-Ober | 2014-09-29 | 1 | -6/+6 |
| | | | | | | Hash#keys.each allocates an array of keys; Hash#each_key iterates through the keys without allocating a new array. This is the reason why Hash#each_key exists. | ||||
* | fixed-case when invalid action name has passed | Kuldeep Aggarwal | 2013-11-28 | 1 | -0/+3 |
| | |||||
* | fixed typo `destory` => `destroy` [ci skip] | Kuldeep Aggarwal | 2013-11-28 | 1 | -1/+1 |
| | |||||
* | Missing or unneeded require extract_options | Akira Matsuda | 2013-02-01 | 1 | -0/+1 |
| | |||||
* | Extract common controllers to abstract_unit | Rafael Mendonça França | 2012-08-13 | 1 | -29/+0 |
| | |||||
* | removes usage of Object#in? from the code base (the method remains defined ↵ | Xavier Noria | 2012-08-06 | 1 | -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/rails | Xavier Noria | 2012-08-02 | 1 | -1/+0 |
| | |||||
* | Raise Assertion instead of RoutingError for routing assertion failures. | David Chelimsky | 2012-05-20 | 1 | -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 method | Jose and Yehuda | 2012-04-24 | 1 | -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 PATCH | David Lee | 2012-02-22 | 1 | -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 tests | Carlos Antonio da Silva | 2012-01-17 | 1 | -1/+0 |
| | |||||
* | all routes can be stored in the Journey Routes object | Aaron Patterson | 2011-09-12 | 1 | -1/+1 |
| | |||||
* | Pull up a method we only use once. | Aaron Patterson | 2011-09-08 | 1 | -5/+1 |
| | |||||
* | Conditions must never be equal | Aaron Patterson | 2011-09-08 | 1 | -6/+1 |
| | |||||
* | There is no need to be destructive with the passed-in options. | thedarkone | 2011-07-28 | 1 | -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 places | Prem Sichanugrist | 2011-04-11 | 1 | -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 Controller | Carlos Antonio da Silva | 2010-09-06 | 1 | -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é Valim | 2010-09-05 | 1 | -51/+3 |
| | |||||
* | This test is invalid for new router | Łukasz Strzałkowski | 2010-09-05 | 1 | -20/+0 |
| | |||||
* | raise error on invalid HTTP methods or :head passed with :via in routes | Piotr Sarnacki | 2010-09-05 | 1 | -1/+1 |
| | |||||
* | Implemented resources :foos, :except => :all option | Piotr Sarnacki | 2010-09-05 | 1 | -3/+9 |
| | |||||
* | Fixed almost all resources tests | Piotr Sarnacki | 2010-09-05 | 1 | -159/+213 |
| | |||||
* | Removed deprecated RouteSet API, still many tests fail | Piotr Sarnacki | 2010-09-05 | 1 | -172/+168 |
| | |||||
* | Revert "Setup explicit requires for files with exceptions. Removed them from ↵ | José Valim | 2010-09-02 | 1 | -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łkowski | 2010-09-02 | 1 | -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 path | Santiago Pastorino | 2010-08-14 | 1 | -1/+1 |
| | |||||
* | adds missing requires for Object#try | Xavier Noria | 2010-08-09 | 1 | -0/+1 |
| | |||||
* | Consistent routing language | Joshua Peek | 2010-03-30 | 1 | -7/+7 |
| | |||||
* | Don't force singularization of singleton resource names, e.g. /preferences ↵ | Andrew White | 2010-03-15 | 1 | -0/+7 |
| | | | | | | [#4089 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com> | ||||
* | If IntegrationSession is initialized with an objects that responds to ↵ | Carlhuda | 2010-02-26 | 1 | -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_for | Carlhuda | 2010-02-26 | 1 | -2/+2 |
| | |||||
* | Rename metaclass to singleton_class | Carlhuda | 2010-02-25 | 1 | -2/+2 |
| | |||||
* | WIP: Remove the global router | Carlhuda | 2010-02-25 | 1 | -5/+8 |
| | |||||
* | Remove ActionController::Base.resources_path_names | Carl Lerche | 2010-02-24 | 1 | -9/+10 |
| | |||||
* | Use ActionDispatch::Routing everywhere | Martin Schürrer | 2010-02-21 | 1 | -2/+2 |
| | |||||
* | Respect resources_path_names and :path_names options in new dsl | Joshua Peek | 2010-01-13 | 1 | -21/+21 |
| | |||||
* | optimise_named_routes is unnecessary | Joshua Peek | 2010-01-13 | 1 | -10/+0 |
| | |||||
* | Remove fancy method not allowed resource exceptions since they are | Joshua Peek | 2009-12-11 | 1 | -4/+4 |
| | | | | too much of a hack | ||||
* | New routing dsl | Joshua Peek | 2009-10-20 | 1 | -10/+10 |
| | |||||
* | Group together all the old routing dsl logic | Joshua Peek | 2009-10-20 | 1 | -5/+5 |
| | |||||
* | Move Routing into AD | Joshua Peek | 2009-10-20 | 1 | -6/+6 |
| | |||||
* | Rewrite resource routing tests that are coupled to the router implementation | Joshua Peek | 2009-09-13 | 1 | -2/+3 |
| | |||||
* | Added both the documentation and a test case for the collection path name ↵ | Hugo Peixoto | 2009-08-09 | 1 | -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 Asan | 2009-05-01 | 1 | -0/+8 |
| | | | | | | [#2595 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Fix requirements for additional member/collection routes [#2054 state:resolved] | Mike Gunderloy | 2009-03-14 | 1 | -0/+26 |
| | | | | Signed-off-by: Joshua Peek <josh@joshpeek.com> | ||||
* | Revert 5b7527ca "Failing test for routes with member & requirement" [#2054 ↵ | Joshua Peek | 2009-03-13 | 1 | -8/+0 |
| | | | | state:wontfix] |