That helps, thanks guys ! On Oct 28, 10:29 am, Matt Jones <[email protected]> wrote: > On Oct 28, 2011, at 9:30 AM, Jeremy Savoy wrote: > > > Not sure if this is possible, but I would like for the "name" of the > > item I'm showing or editing to not show up in the URL. For example, if > > I have a task model and edit a task, the URL would be .... > > >http://0.0.0.0:3000/tasks/1-some-task/edit > > > Is there some way to still provide the same functionality but remove > > the "name" portion from the URL or route, where the following URL > > would still take you to the edit page of the task that was selected to > > be edited (or shown in a different case)? > > >http://0.0.0.0:3000/tasks/edit > > This definitely won't work, but /tasks/1/edit would. To switch back to that > style URL, redefine to_param in your model: > > class SomeModel < ActiveRecord::Base > def to_param > id.to_s > end > end > > --Matt Jones
-- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
