Advertisement
Guest User

Untitled

a guest
Mar 10th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rails 0.81 KB | None | 0 0
  1. <h3>Check-in <%= @checkin.checkin_type.name %></h3>
  2. <form method="post" action="/checkin">
  3.     <div>
  4.         <% @questions.each do |question| %>
  5.         <div>
  6.             <%= question.question %>
  7.            
  8.             <% question.checkin_question_options.all(:order => "id").each do |option| %>
  9.             <ul>
  10.                 <% if question.options_exclusive %>
  11.                     <input type="radio" name="<%= question.question %>" value="<%= option.id %>">
  12.                 <% else %>
  13.                     <input type="checkbox" name="<%= question.question %>" value="<%= option.id %>">
  14.                 <% end %>
  15.                 <%= option.option %>
  16.             </ul>
  17.             <% end %>
  18.         </div>
  19.         <% end %>
  20.         <input type="submit" value="Fazer check-in">
  21.     </div>
  22. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement