14 lines
393 B
Plaintext
14 lines
393 B
Plaintext
<% if current_user.nil? %>
|
|
<%= render partial: "answeredquestion", object: question %>
|
|
<% else %>
|
|
<div style="background:red"><b><%= question.title%></b>
|
|
<ul>
|
|
<% question.choices.each do |c| %>
|
|
<li><%= render c %></li>
|
|
<% end %>
|
|
</ul>
|
|
<%= render partial: "answeredquestion", object: question if question.answers.where(user_id: current_user.id).count>0%>
|
|
|
|
</div>
|
|
<% end %>
|