%= form_with(model: [:admin, week]) do |form| %> <% if week.errors.any? %> <%= error_messages(week) %> <% end %> <%= form.hidden_field :course_id %>