<%= form_with(model: [:admin, course]) do |form| %>
  <% if course.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(course.errors.count, "error") %> prohibited this admin_course from being saved:</h2>

      <ul>
      <% course.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>
  <div class="form-row">
    <div class="form-group col-md-6">
      <%= form.label :name %>
      <%= form.text_field :name, class: 'form-control' %>
    </div>

    <div class="form-group col-md-6">
      <%= form.label :description %>
      <%= form.text_area :description, class: 'form-control' %>
    </div>
  </div>
  <%= form.submit 'Zapisz', class: 'btn btn-primary' %>
<% end %>
