After trying to upgrade a project to rails 2.3.4 to fix the serious
XSS security issue (
http://groups.google.com/group/rubyonrails-
security/msg/7f57cd7794e1d1b4), resources_controller generates a lot
of deprecation warnings. Like so:
DEPRECATION WARNING: routes_for_controller_and_action() has been
deprecated. Please use routes_for(). (called from
routes_for_controller_and_action at /Users/tomtt/created/projects/foo/
vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:
473)
The reason is
that ::ActionController::Routing::Routes.routes_for_controller_and_action
was deprecated in this release. They thought it was alright to pull
this method from the public api because it is not used internally.
https://rails.lighthouseapp.com/projects/8994/tickets/3023
I have tried adding 2-3-stable to garlic, but I get 637 examples, 470
failures (other versions are fine), even though we have been
successfully using RC with 2-3-stable on our project for a while now.
So this keeps me from authoring a patch myself for now.
A workaround seems to be to just get all routes
using ::ActionController::Routing::Routes.routes instead
of ::ActionController::Routing::Routes.routes_for_controller_and_action,
but I am aware that getting all the routes may have performance
implications.
The deprecation warning suggests using routes_for but that method is
not documented at all and does not accept the controller and action as
arguments so I think this is a Red Herring.
I was hoping somebody more experienced with RC could have a look at
this...
Tom.