# Need to verify email address - help!

**URL:** <https://www.ruby-forum.com/t/need-to-verify-email-address-help/103870>\
**Category:** Rails\
**Created:** [May 11, 2007, 4:51am UTC](https://www.ruby-forum.com/t/need-to-verify-email-address-help/103870 "2007-05-11T04:51:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vince](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5e925/32.png) [@vince](https://www.ruby-forum.com/u/vince)\
**Post date:** [May 11, 2007, 4:51am UTC](https://www.ruby-forum.com/t/need-to-verify-email-address-help/103870/1 "2007-05-11T04:51:03Z")

</div>

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 =\>  
‘verify’

my plan was to make something like this work:

> **[Overview](https://www.salesforce.com/products/platform/overview/?d=70130000000liBh&internal=true&bc=HA)**
>
> Go digital fast and empower your teams to work from anywhere. Develop scalable, custom business apps with low-code development or give your teams the tools to build with services and APIs.

i thought i could use CGI.escape and CGI.unescape to generate the  
proper URL but it gets stuck at the period in the removed\_email\_address@domain.invalid part and  
gives me this:

ruby script/console

> > rs = ActionController::Routing::Routes  
> > s = CGI.escape(“removed\_email\_address@domain.invalid”)  
> > =\> “a%[40a.com](http://40a.com)”

> > rs.recognize\_path ‘/verify/a%[40a.com/akey](http://40a.com/akey)’  
> > ActionController::RoutingError: no route found to match “/verify/  
> > removed\_email\_address@domain.invalid/akey” 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 removed\_email\_address@domain.invalid)

> > rs.recognize\_path ‘/verify/a%40a/akey’.  
> > =\>  
> > {:action=\>“verify”, :email=\>“a@a”, :key=\>“akey”, :controller=\>“user”}

help!
