Say I have a "Member" ActiveRecord object with a typical integer id
attribute, and a string 'username' attribute.

If I generate routes for members using map.resources :members, then the
output from the edit helper is:
edit_member_path(@member) => "members/23/edit"

My goal is that I really want:
edit_member_path(@member) => "members/billybob/edit"

Where instead of using .id it uses .username so that the links generated
by all of the different helper methods are prettier and memorable.

Is this possible via some kind of option? Can I simply replace these
helper methods with new implementations? I don't even know where these
implementations are or what they really look like.

Thanks.
-- 
Posted via http://www.ruby-forum.com/.

-- 
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.

Reply via email to