you can use http://svn.techno-weenie.net/projects/plugins/permalink_fu/plugin
On Wed, Apr 14, 2010 at 1:50 PM, makoto kuwata <[email protected]> wrote: > Hi, > > I have quetion about 'named route'. > > I defined the following in routes.rb to use ':title' instead of ':id'. > > map.movie '/ > movies/:title', :controller=>'movies', :action=>'show', > :conditions=>{:method=>:get} > > This seems to work fine, but 'movie_path()' still uses ':id' instead > of ':title'. > > movie = Movie.get(parms[:id]) > p movie_path(movie) #=> "/movies/1" (expected is "/movies/Avatar") > > How to change 'movie_path()' to use ':title'? > > -- > regards, > makoto > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<rubyonrails-talk%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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/rubyonrails-talk?hl=en.

