Removing (.:format) from a resource in routes


I have a routes.rb like this:

Xxx::Application.routes.draw do
  resources :sessions, :only => [ :new, :create, :destroy ]
  resources :users
  root :to => 'welcome#index'

this produces the following in rake routes:

nmelzer@ubuntu-Delly:~/Dokumente/sources/ruby/1.9.2/rails3.1/xxx$ rake
  users_new GET /users/new(.:format) {:controller=>"users",
   sessions POST /sessions(.:format) {:action=>"create",
new_session GET /sessions/new(.:format) {:action=>"new",
    session DELETE /sessions/:id(.:format) {:action=>"destroy",
      users GET /users(.:format) {:action=>"index",
            POST /users(.:format) {:action=>"create",
   new_user GET /users/new(.:format) {:action=>"new",
  edit_user GET /users/:id/edit(.:format) {:action=>"edit",
       user GET /users/:id(.:format) {:action=>"show",
            PUT /users/:id(.:format) {:action=>"update",
            DELETE /users/:id(.:format) {:action=>"destroy",
       root / {:controller=>"welcome",

Since I am only serving HTML and dont plan to serv other formats I
want to get rid of all the (.:format) in the routes, is that possible?

in 3.1.1 at least you can add , :format => false to the end of the route.

found here… .
under section 3.11 Route Globbing

Thank you, I did a quick look on that page yesterday before asking,
but I could not find it.

I really could have give CTRL+F a try :smiley: