TomRossi7 wrote: > I want to provide a link for users to unsubscribe to our newsletter. > I don't want the actual email address to show up in the url.
Why not? If you're only sending the link to that user, there's no security risk. > So I > would like it something like /unsubscribe/wx313asdf31. What is the > simplest method of encrypting the email to a URL compliant string? As James suggested, if you've already got the users stored in the DB, then just use their DB ID or a random unique string that you store in the DB. If you're not storing e-mail addresses in the DB, then you need some sort of reversible encryption. Base64 or uuencode would also work if you don't need high security. > > Thanks, > Tom Best, -- Marnen Laibow-Koser http://www.marnen.org [email protected] -- 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

