# Best strategy to implement secure, one-time voting links

**URL:** <https://www.ruby-forum.com/t/best-strategy-to-implement-secure-one-time-voting-links/189900>\
**Category:** Rails\
**Created:** [June 9, 2010, 4:43pm UTC](https://www.ruby-forum.com/t/best-strategy-to-implement-secure-one-time-voting-links/189900 "2010-06-09T16:43:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alan\_McCann](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c2a13f/32.png) [@Alan\_McCann](https://www.ruby-forum.com/u/Alan_McCann)\
**Post date:** [June 9, 2010, 4:43pm UTC](https://www.ruby-forum.com/t/best-strategy-to-implement-secure-one-time-voting-links/189900/1 "2010-06-09T16:43:04Z")

</div>

I am building an application where guests and registered users are  
sent an email with a request to vote on a given issue.

- registered user sends vote request email,
- email containts voting links that have some type of enrypted link  
paramenter to uniquely identify the vote request to that recipient
- recipient clicks on appropriate link to vote
- the link is then invalid after the vote

I want to incorporate this with state\_machine.

Is there a gem that helps enable this or is this something I should  
build myself.

Devise and authlogic seem to do it but only for the user model - a  
user could have many such vote requests outstanding at any time).

For those who have looked at Hobo, this is basically what they call a  
“secure link” patter and it uses a key and key timestamp to enable the  
process

Thanks!
