you can use http://svn.techno-weenie.net/projects/plugins/permalink_fu/plugin
On Wed, Apr 14, 2010 at 1:50 PM, makoto kuwata <kwa...@gmail.com> 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 rubyonrails-t...@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com<rubyonrails-talk%2bunsubscr...@googlegroups.com> > . > 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.