All,
I’ve a problem with my routing settings. I added :lang default component
value to my routes.rb like this:
map.connect ‘’, :controller => ‘store’, :lang => ‘pl_PL’
map.connect ‘search’, :controller => ‘search’, :action => ‘search’,
:lang => ‘pl_PL’
map.connect ‘:controller/:action/:id’, :id => /\d+/, :lang => ‘pl_PL’
and it breaks my functional tests. Basically when I call get or post in
my tests like this:
post :destroy, :id => 1
it fails like this:
- Error:
test_destroy(AdminControllerTest):
ActionController::RoutingError: No url can be generated for the hash
{:controller=>“admin”, :action=>“destroy”, :id=>“1”}
generated_code/routing/generation.rb:67:ingenerate_default_path' c:/Install/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/routing.rb:419:in
generate_path’
c:/Install/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/routing.rb:415:in
generate' c:/Install/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/routing.rb:602:in
extra_keys’
c:/Install/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/test_process.rb:86:in
assign_parameters' c:/Install/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/test_process.rb:295:in
process’
c:/Install/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/test_process.rb:307:in
post' admin_controller_test.rb:80:in
test_destroy’
I’m using Rails 1.0 with Webrick. Anyone knows how to fix this?
Thanks,
Maciej.