% if current_user.nil? %>
<%= render partial: "answeredquestion", object: question %>
<% else %>
<%= question.title%> <%=question.text%>
<% question.choices.each do |c| %>
- <%= render c %>
<% end %>
<%= render partial: "answeredquestion", object: question if question.answers.where(user_id: current_user.id).count>0%>
<% end %>