Hello,
I need to use the functionality of params_from
, which was deprecated. Now route_to
combines behavior of params_from
and route_for
. But I do not want to test that the route generates the path, because it does not and this is intentional (for backward compatability in old emails, I need to "alias" old path to the correct controller/action, but path generated by the new route will be different. I know, confusing ;)
When using params_from
and route_to
, I get conflicting results (maybe params_for is broken?):
# params_from(:get, 'user/tasks').should == { :controller => 'user', :action => 'tasks' }
No route matches "user/tasks" with {:method=>:get}
# { :get => 'user/tasks' }.should_not be_routable
Expected 'GET user/tasks' to fail, but it routed to {"action"=>"tasks", "controller"=>"user"} instead
The route does exist, I can use the path via UI successfully.
IMO this combination of params_from
and route_for
is a bad idea, unless the seperate matches are still supported. But maybe I've missed something obvious ;)
Thank you.