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:
http://www.site.com/verify/a@a.com/akey
i thought i could use CGI.escape and CGI.unescape to generate the
proper URL but it gets stuck at the period in the a@a.com part and
gives me this:
ruby script/console>> rs = ActionController::Routing::Routes
>> s = CGI.escape("a@a.com")
=> "a%40a.com"
>> rs.recognize_path ''/verify/a%40a.com/akey''
ActionController::RoutingError: no route found to match "/verify/
a@a.com/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 a@a.com)
>> rs.recognize_path ''/verify/a%40a/akey''.
=>
{:action=>"verify", :email=>"a@a",
:key=>"akey", :controller=>"user"}
help!
--~--~---------~--~----~------------~-------~--~----~
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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---