Hi!

I have a routes.rb like this:

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

this produces the following in rake routes:

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

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?

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedOct 15, '11 at 6:43p
activeOct 16, '11 at 5:41a
posts3
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Norbert Melzer: 2 posts Jim Morris: 1 post

People

Translate

site design / logo © 2021 Grokbase