Fixes #245
Poll card now shows the responses to the poll in the public side
This commit is contained in:
@@ -113,4 +113,7 @@ class Poll < ActiveRecord::Base
|
||||
related.nil?
|
||||
end
|
||||
|
||||
def answer_count
|
||||
Poll::Answer.where(question: questions).count
|
||||
end
|
||||
end
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
|
||||
<div class="card-section text-center">
|
||||
<strong><%= t("dashboard.polls.poll.responses", count: poll.questions.count) %></strong>
|
||||
<strong><%= t("dashboard.polls.poll.responses", count: poll.answer_count) %></strong>
|
||||
</div>
|
||||
|
||||
<div class="card-section text-center">
|
||||
|
||||
Reference in New Issue
Block a user