views:

178

answers:

2

I m having a controller users in which there are three actions show, update and prepare and there respective views in views/users directory

Now when i am trying this:--

http://localhost:3000/users/prepare

I am getting an error

No route matches "/users/prepare"

can anybody explain me how to specify this routes in routes.rb for this.. I am a beginner for rails

  map.connect '/prepare', :controller => 'users', :action => 'prepare'

this is not working..

EDIT Anybody who can help me pls.

A: 
John Topley
A: 

This is the rails3 way:

resources :users do
  get :prepare, :on => :member
end

Show and update are already covered by just mapping it as a resource.

Bitterzoet
he means `get :prepare, :on => :collection`
macek