Listing Polls

<% if cuser and cuser.admin? %> <% end %> <% @polls.reverse_each do |poll| %> <% if cuser and cuser.admin? %> <% end %> <% end %>
Question End date Votes User
<%= link_to (h poll.question), poll %> <%= longtime poll.end_date %> <%=h poll.votes %> <%=h poll.user %> <%= link_to icon('pencil'), edit_poll_path(poll) %> <%= link_to icon('times'), poll, confirm: 'Are you sure?', method: :delete %>
<% if cuser and cuser.admin? %> <%= link_to 'New Poll', new_poll_path, class: 'button' %> <% end %>