vegantech/sims

View on GitHub
app/views/custom_flags/_new_custom_flag.html.erb

Summary

Maintainability
Test Coverage
<%= error_messages_for 'custom_flag' %>
<%= form_for(@custom_flag, :remote => true) do |form| %>
  <label for='custom_flag_reason'>Please enter your reason for this custom:</label>
  <%= form.text_field :reason%> <br />
  <label for='custom_flag_category'>Category:</label><% flagtypes= Flag::FLAGTYPES %>
  <%=form.select :category,flagtypes.collect{|h,k| [k[:humanize],h]}%>
  <%=form.hidden_field :student_id%>
  <%=form.hidden_field :user_id %><br />
  <%= submit_tag "Save Custom Flag"%>
  <%= link_to :cancel, custom_flags_path(:student_id => @custom_flag.student), :remote => true %>

<%end%>