# Help with implementation strategy

**URL:** <https://www.ruby-forum.com/t/help-with-implementation-strategy/124608>\
**Category:** Rails\
**Created:** [December 30, 2007, 11:12pm UTC](https://www.ruby-forum.com/t/help-with-implementation-strategy/124608 "2007-12-30T23:12:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jables](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@Jables](https://www.ruby-forum.com/u/Jables)\
**Post date:** [December 30, 2007, 11:12pm UTC](https://www.ruby-forum.com/t/help-with-implementation-strategy/124608/1 "2007-12-30T23:12:58Z")

</div>

Hey guys,  
I’m hoping someone can help me with a strategy to implement the  
following: I have a voting system with a models/tables for votes,  
links, and users. In the view I want to go through the collection of  
links and for each one check to see if a user has voted on it. All  
the details of displaying the links are implemented, what I am trying  
to figure out the best way to take each link and ask - has the current  
logged in user voted for this? Any help with an implementation would  
be much appreciated it.

JB

---

<div class="post-metadata">

**Author:** ![Jables](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@Jables](https://www.ruby-forum.com/u/Jables)\
**Post date:** [December 31, 2007, 6:52pm UTC](https://www.ruby-forum.com/t/help-with-implementation-strategy/124608/2 "2007-12-31T18:52:50Z")

</div>

On 12/30/07, Jables [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hey guys,  
> I’m hoping someone can help me with a strategy to implement the  
> following: I have a voting system with a models/tables for votes,  
> links, and users. In the view I want to go through the collection of  
> links and for each one check to see if a user has voted on it. All  
> the details of displaying the links are implemented, what I am trying  
> to figure out the best way to take each link and ask - has the current  
> logged in user voted for this? Any help with an implementation would  
> be much appreciated it.

Have you considered storing the user id with the vote? You can then  
validate your list against the user’s current session id or whatever.

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)
