Fixed views and Poll::Stats model to pass the specs

This commit is contained in:
iagirre
2017-10-17 16:07:44 +02:00
parent 6a292daf42
commit 0f73b787b2
3 changed files with 5 additions and 5 deletions

View File

@@ -26,7 +26,7 @@ class Poll
end
def total_participants_web_percentage
total_participants_web * 100 / total_participants
(total_participants) == 0 ? 0 : total_participants_web * 100 / total_participants
end
def total_participants_booth

View File

@@ -1,14 +1,14 @@
<div class="row">
<div class="small-12 column">
<ul class="tabs" data-tabs id="polls-tabs">
<li class="tabs-title is-active">
<li class="tabs-title">
<%= link_to "#tab-stats" do %>
<h3>
<%= "Estadísticas" %> <!-- t("polls.show.comments_tab") -->
</h3>
<% end %>
</li>
<li class="tabs-title">
<li class="tabs-title is-active">
<%= link_to "#tab-information" do %>
<h3>
<%= "Información" %>

View File

@@ -32,10 +32,10 @@
<div class="tabs-content" data-tabs-content="polls-tabs" role="tablist">
<%= render "results_subnavigation" %>
<div id="tab-stats" class="tabs-panel is-active">
<div id="tab-stats" class="tabs-panel">
<%= render "polls/stats/show" %>
</div>
<div id="tab-information" class="tabs-panel">
<div id="tab-information" class="tabs-panel is-active">
<%= render "show" %>
</div>
</div>