unregistered users will see the smile_count if at least someone smiled the answer

This commit is contained in:
nilsding 2014-12-07 12:46:25 +01:00
parent be78c449a0
commit a34972379f
1 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,8 @@
%span.hidden-xs.text-muted
- unless user_signed_in?
%span{id: "ab-smile-count-#{a.id}"}= a.smile_count
users smiled this
- if a.smile_count > 0
%span{id: "ab-smile-count-#{a.id}"}= a.smile_count
users smiled this
- if user_signed_in?
- if current_user.smiled? a
%button.btn.btn-info.btn-sm{type: :button, name: 'ab-smile', 'data-a-id' => a.id, 'data-action' => 'unsmile'}