chiliec / yii2-vote

Provides voting for any model :+1: :-1:
BSD 3-Clause "New" or "Revised" License
72 stars 29 forks source link

Question on determining if user voted already. #27

Open jsobers1331 opened 8 years ago

jsobers1331 commented 8 years ago

How can I make the Thumbs up or Thumbs down be highlighted or a different color if current user has voted already?

chiliec commented 8 years ago

Good question, but in current implementation you can't call one method and know that user has voted already. This lines respond to this functionality https://github.com/Chiliec/yii2-vote/blob/master/actions/VoteAction.php#L43-L47 and it can be moved to a separate method.