<% if flash[:error].present? %>
<%= flash[:error] %>

<% quiz.errors.messages.each do |k,v| %> <%= "#{k.to_s} #{v.join(' and ')}" %>
<% end %>

<% end %> <%= form_for quiz, url: action do |form| %>
<%= form.label :name, "Quiz Description" %> <%= form.text_field :name %>
<%= form.label :dept, 'Department' %> <%= form.text_field :dept %>
<%= form.label :unit, 'Unit' %> <%= form.text_field :unit %>
<%= form.submit %> <% end %>