chiliec / yii2-vote

Provides voting for any model :+1: :-1:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question on determining if user voted already.

jsobers1331 opened this issue · comments

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

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.