Default format for requests:
You can set the default format of a given route to xml using the defaults hash.
Examples:
# single match defaulting to XML (/plots/1 is the same as /plots/1.xml)
match 'posts/:id' => 'posts#show', :defaults => { :format => 'xml' }
# using resources, defaulting to XML (all action use XML by default)
resources :posts, :defaults => { :format => 'xml' }
# using resources and mixing with other options
resources :posts,
:only => [:new, :create, :destroy],
:defaults => { :format => 'xml' }
It’s always a good idea to search the official Ruby on Rails routing guide, it’s fairly in-depth and a very good first-stop resource for any routing issues.