Removing id from show for good

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

Hi !

2006/3/29, bao lee [email protected]:

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 !

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs