This project is archived and is in readonly mode.
Removed unused routing method
Reported by Gabe da Silveira | August 9th, 2009 @ 10:38 AM
While working on #2510 I noticed this method that appears to be completely unused. I removed it and all tests are passing.
I've attached a patch.
It should apply to master and 2-3-stable
Comments and changes to this ticket
-
Rizwan Reza August 9th, 2009 @ 03:43 PM
verified
+1 This patch works perfectly on both current branches. But I am not sure if all of the tests pass, the method is useless, as there are methods present in the code which are not tested.
-
Simon Jefford August 9th, 2009 @ 05:40 PM
-1 this method is in the public api for Routeset so could break plugins
-
CancelProfileIsBroken August 9th, 2009 @ 05:49 PM
- State changed from new to wontfix
No telling who might be using this. We may find out in 3.0 if it's not in the new public API :)
-
CancelProfileIsBroken August 9th, 2009 @ 05:49 PM
- Tag changed from bugmash, routing to routing
-
CancelProfileIsBroken August 9th, 2009 @ 05:50 PM
- Tag changed from routing to bugmash, routing
Lifo suggests: remove from 2.3, add deprecation pointing to routes_for
-
Dan Croak August 9th, 2009 @ 05:56 PM
+1 verified Gabe's patch applies to 2-3-stable.
I've attached a patch that deprecates instead of removes. Suggests route_for().
-
Dan Croak August 9th, 2009 @ 05:56 PM
- Assigned user set to Pratik
-
Repository August 9th, 2009 @ 06:19 PM
(from [8058a1d7d7e2b66d0275bf852712f78394c19d01]) Deprecation warning for routes_for_controller_and_action. Use routes_for instead. [#3023]
Signed-off-by: Pratik Naik pratiknaik@gmail.com
http://github.com/rails/rails/commit/8058a1d7d7e2b66d0275bf852712f7... -
Repository August 9th, 2009 @ 06:19 PM
- State changed from wontfix to resolved
(from [1185500ff0465aff8686315f1b785884f133adcf]) Remove unused routeset method routes_for_controller_and_action in favour for routes_for [#3023 state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com
http://github.com/rails/rails/commit/1185500ff0465aff8686315f1b7858... -
Simon Jefford August 9th, 2009 @ 06:20 PM
- Assigned user cleared.
Patch for 2.3 - deprecates the offending method. The patch above should be applied to master.
-
Repository August 9th, 2009 @ 06:26 PM
(from [c41fb5865f342fd88df45a9a920ac582a17f314d]) Add test for routes_for_controller_and_action deprecation [#3023]
Signed-off-by: Pratik Naik pratiknaik@gmail.com
http://github.com/rails/rails/commit/c41fb5865f342fd88df45a9a920ac5... -
CancelProfileIsBroken August 9th, 2009 @ 06:53 PM
- Tag changed from bugmash, routing to routing
-
tomtt September 7th, 2009 @ 05:57 AM
I am not sure if this is the best place to ask this. If not, please tell where to go.
This changeset generates a deprecation warning in the resources_controller plugin. The documentation of routes_for is non-existent so I was hoping somebody could point me in the right direction as to how to refactor the offending code:
@recognized_route ||= ::ActionController::Routing::Routes.routes_for_controller_and_action(controller_path, action_name).find { |route| ... }routes_for requires controller and action to be defined, but I was unable to figure out where it is supposed to get these from and how to set the correct values from the plugin.
-
Ian White September 11th, 2009 @ 08:41 PM
The deprecation warning suggests that the routes_for method be used instead. Hoowever, this method doesn't work. It references a controller and action local var that are not in scope. I'm wondering if this new method was partially implemented?
Also, there are no tests that I could find for this method.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 3023 Removed unused routing method (from [8058a1d7d7e2b66d0275bf852712f78394c19d01]) Depreca...
- 3023 Removed unused routing method (from [1185500ff0465aff8686315f1b785884f133adcf]) Remove ...
- 3023 Removed unused routing method (from [c41fb5865f342fd88df45a9a920ac582a17f314d]) Add tes...
- 3231 #routes_for method doesn't work at all In ticket #3023, #routes_for_controller_and_action is dep...