Rails beginner Rails beginner - 1 year ago 47
Ruby Question

Rails how to rewrite this old route map.connect?

How do I rewrite this old route Rails 1.2.6 to Rails 3? :

# Allow downloading Web Service WSDL as a file with an extension
# instead of a file named 'wsdl'
map.connect ':controller/service.wsdl', :action => 'wsdl'

I can´t see how I should use match route etc.

I have used:

match ':controller/service.wsdl', :action => 'wsdl'

But I dont think it is working correct


Try this:

match '/controller/service.wsdl' => 'controller#service.wsdl', :as => :wsdl

I'm guessing that your controller is not named controller. If it is, I'd rename it and change the above route as well.