<%= simple_form_for [patient, patient_test], html: { class: "form patient-test" } do |f| %> <%= form_error_notification(patient_test) %> <%= f.input :testname, html5: true, input_html: { autofocus: true } %> <%= link_to "Cancel", patient_path(patient), class: "btn btn--light" %> <%= f.submit class: "btn btn--secondary" %> <% end %>