Forum: Ruby on Rails need to verify email address - help!

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Fd4ee9ae435369ab446489607701f518?d=identicon&s=25 vince (Guest)
on 2007-05-11 04:51
(Received via mailing list)
not sure if this is the best way to go about it, but i'm generating a
key that gets sent to a person's email and then ask them click on the
link to verify the key.

routes.rb then looks like this for me:
map.connect 'verify/:email/:key', :controller => 'user', :action =>

my plan was to make something like this work:

i thought i could use CGI.escape and CGI.unescape to generate the
proper URL but it gets stuck at the period in the part and
gives me this:

ruby script/console
>> rs = ActionController::Routing::Routes
>> s =  CGI.escape("")
=> ""

>> rs.recognize_path '/verify/'
ActionController::RoutingError: no route found to match "/verify/" with {}
        from /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/routing.rb:1292:in `recognize_path'

but this works, (so it's getting stuck at the period in

>> rs.recognize_path '/verify/a%40a/akey'.
{:action=>"verify", :email=>"a@a", :key=>"akey", :controller=>"user"}

This topic is locked and can not be replied to.