Simplify code to link to a poll with one question
This commit is contained in:
@@ -29,14 +29,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="small-12 medium-6 column" data-equalizer-watch>
|
<div class="small-12 medium-6 column" data-equalizer-watch>
|
||||||
<div class="dates"></div>
|
<div class="dates"></div>
|
||||||
<% if poll.questions.count == 1 %>
|
<% if poll.questions.one? %>
|
||||||
<% poll.questions.each do |question| %>
|
<h4><%= link_to_poll poll.questions.first.title, poll %></h4>
|
||||||
<h4><%= link_to_poll question.title, poll %></h4>
|
|
||||||
<%= poll_dates(poll) %>
|
<%= poll_dates(poll) %>
|
||||||
<% end %>
|
|
||||||
<% else %>
|
<% else %>
|
||||||
<h4><%= link_to_poll poll.name, poll %></h4>
|
<h4><%= link_to_poll poll.name, poll %></h4>
|
||||||
<%= poll_dates(poll) %>
|
<%= poll_dates(poll) %>
|
||||||
|
|
||||||
<ul class="margin-top">
|
<ul class="margin-top">
|
||||||
<% poll.questions.each do |question| %>
|
<% poll.questions.each do |question| %>
|
||||||
<li><%= question.title %></li>
|
<li><%= question.title %></li>
|
||||||
|
|||||||
Reference in New Issue
Block a user