Removing id from show for good


#1

hi guys, anyone know how to do this?

from /recipe/show/1 to /recipe/show/

i have been trying soooo many methods which i feel like a serious noob.

in routes.rb, i tried changing the default connection from
map.connect ‘:controller/:action/:id’
to
map.connect ‘:controller/:action/’

or map.connect ‘:controller/:action/:id’, :id=>{/\d+}
or map.connect ‘:controller/:action/:id’ :requirements=>{ :id=>{/\d+}}

all failed me miserably…

it either remains the same as /recipe/show/1 or /recipe/show?id=1 or
error handling error…

is it possible to do this in the first place?

Insanity is getting out of hand. help needed urgently.

T-T


#2

Hi !

2006/3/29, bao lee removed_email_address@domain.invalid:

hi guys, anyone know how to do this?

from /recipe/show/1 to /recipe/show/

How do you expect the application to know which recipe to show ?

Bye !