sharedlists/lib/templates/haml/scaffold/_form.html.haml

13 lines
408 B
Text
Raw Normal View History

2021-12-18 15:56:47 +01:00
-# frozen_string_literal: true
= simple_form_for(@<%= singular_table_name %>) do |f|
= f.error_notification
= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present?
.form-inputs
<%- attributes.each do |attribute| -%>
= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %>
<%- end -%>
.form-actions
= f.button :submit