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
What do i need to change in the routes? Thanks
On Sun, Apr 4, 2010 at 4:08 PM, David Z. [email protected]
wrote:
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
On Sun, Apr 4, 2010 at 4:27 PM, Conrad T. [email protected]
wrote:
David, here’s an excellent blog post by Obie F. which goes into
further
detail about using to to_param method:
Good luck,
-Conrad
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs