instead of blah/16 can i have the title there?

Hey guys

You know how by default the scaffold show view takes you to for ex-
www.blah.com/blahs/16?

How would i replace that 16 with something else?... most preferably
the title field or something

What do i need to change in the routes? Thanks

Hey guys

You know how by default the scaffold show view takes you to for ex-

www.blah.com/blahs/16?

How would i replace that 16 with something else?.. most preferably

the title field or something

David, please take a look at the to_param method which you can redefine to

display something other than the id field.

Good luck,

-Conrad

Hey guys

You know how by default the scaffold show view takes you to for ex-

www.blah.com/blahs/16?

How would i replace that 16 with something else?.. most preferably

the title field or something

David, please take a look at the to_param method which you can redefine to

display something other than the id field.

Good luck,

-Conrad

What do i need to change in the routes? Thanks

David, here’s an excellent blog post by Obie Fernandez which goes into further

detail about using to to_param method:

http://www.jroller.com/obie/entry/seo_optimization_of_urls_in

Good luck,

-Conrad