Minor fixes

This commit is contained in:
María Checa
2017-10-07 11:37:33 +02:00
parent 9a396fe634
commit e127b52225
2 changed files with 2 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
App.Polls =
generateToken: ->
token = ''
rand = ''
for n in [0..5]
rand = Math.random().toString(36).substr(2) # remove `0.`
token = token + rand;

View File

@@ -39,7 +39,7 @@
</div>
<% else %>
<% if !@poll.voters.find_by_user_id(current_user).present? %>
<% if poll_voter_token(@poll, current_user).empty? %>
<div class="callout primary js-token-message" style="display: none">
<%= t('poll_questions.show.voted_token') %>
</div>