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:
2) 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:in `generate_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.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---