In Ruby on Rails, why http://localhost:3000/foobars/alt/1.xml not work?

Posted by Jian Lin on Stack Overflow See other posts from Stack Overflow or by Jian Lin
Published on 2010-06-11T19:10:35Z Indexed on 2010/06/11 19:12 UTC
Read the original article Hit count: 225

Filed under:
|
|

In Ruby on Rails,

http://localhost:3000/foobars/alt/1

works

but

http://localhost:3000/foobars/alt/1.xml

doesn't work.

config/route.rb is

  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'

so supposedly it supports an id.format in the URL?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about routing