Skip to content

Instantly share code, notes, and snippets.

@bjartek
Created October 21, 2010 09:01
Show Gist options
  • Save bjartek/638156 to your computer and use it in GitHub Desktop.
Save bjartek/638156 to your computer and use it in GitHub Desktop.
<form method="POST" action="<%= url_for :action => :update %>">
<input type="hidden" name="id" value="<%= @question.object %>"/>
<h1 class="groupTitle"><%= @question.q %></h1>
<ul>
<li>
<label for="question[answer]">Eagle</label>
<% if @question.answer == "eagle" %>
<input type="radio" name="question[answer]" checked="checked" value="eagle"/>
<% else %>
<input type="radio" name="question[answer]" value="eagle"/>
<% end %>
</li>
<li>
<label for="question[answer]">White-throated Dipper</label>
<% if @question.answer == "white-throated-dipper" %>
<input type="radio" name="question[answer]" checked="checked" value="white-throated-dipper"/>
<% else %>
<input type="radio" name="question[answer]" value="white-throated-dipper"/>
<% end %>
</li>
<li>
<label for="question[answer]">Blue Tit</label>
<% if @question.answer == "blue-tit" %>
<input type="radio" name="question[answer]" checked="checked" value="blue-tit"/>
<% else %>
<input type="radio" name="question[answer]" value="blue-tit"/>
<% end %>
</li>
<li>
<label for="question[answer]">Seagull</label>
<% if @question.answer == "seagull" %>
<input type="radio" name="question[answer]" checked="checked" value="seagull"/>
<% else %>
<input type="radio" name="question[answer]" value="seagull"/>
<% end %>
</li>
</ul>
<input type="submit" class="standardButton" value="Answer" />
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment