diff --git a/app/models/poll.rb b/app/models/poll.rb index f01960bd6..be313d75b 100644 --- a/app/models/poll.rb +++ b/app/models/poll.rb @@ -113,4 +113,7 @@ class Poll < ActiveRecord::Base related.nil? end + def answer_count + Poll::Answer.where(question: questions).count + end end diff --git a/app/views/dashboard/polls/_poll.html.erb b/app/views/dashboard/polls/_poll.html.erb index 5fc2fa4b7..1519eff18 100644 --- a/app/views/dashboard/polls/_poll.html.erb +++ b/app/views/dashboard/polls/_poll.html.erb @@ -13,7 +13,7 @@