Rails 2.3 basic routing question

I’d like to shorten up a confirmation link so that users won’t have
text-wrapping issues in their e-mail clients. My links look like this
(using Devise confirmable):

http://example.example.com/users/invitation/accept?invitation_token=4O-R8B9XbJdB1OIa2J27

and I’d like to make them more like

http://example.example.com/yes?t=4O-R8B9XbJdB1OIa2J27

or even shorter if possible.

Is there a simple way to do this in routing?

Walter

Here’s what I’ve tried so far, without success:

map.connect ‘/yes/:token’, :controller => ‘users’, :action =>
‘confirmation’, :invitation_token => :token

map.connect ‘/yes/:invitation_token’, :controller =>
‘users’, :action => ‘confirmation’

I tried these both after the map.devise_for :users line, so as to not
screw with the already working login system.

Walter

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs