Hi,
I have a named route with a requirement generated from database
(MyModel.valid_values query returns /my_value_foo/):
route.my_named_route ''my-controller/:my_value'', :action =>
"my_action", :requirements => { :my_value =>
MyModel.valid_values }
but the test:
params_from(:get, "/my-controller/my_value_foo").should ={:controller
=> "my_controller", :action => "my_action", :my_value
=>
"my_value_foo"}
returns a "No route matches"... I checked in the test that
MyModel.valid_values is returning what I expect, so I can''t think of
why it''s failing. Any tips?
In the browser the route works fine.
Cheers,
Enrico