about summary refs log tree commit diff
path: root/lib/templates
diff options
context:
space:
mode:
Diffstat (limited to 'lib/templates')
-rw-r--r--lib/templates/haml/scaffold/_form.html.haml10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/templates/haml/scaffold/_form.html.haml b/lib/templates/haml/scaffold/_form.html.haml
new file mode 100644
index 000000000..ac3aa7bc1
--- /dev/null
+++ b/lib/templates/haml/scaffold/_form.html.haml
@@ -0,0 +1,10 @@
+= simple_form_for(@<%= singular_table_name %>) do |f|
+  = f.error_notification
+
+  .form-inputs
+  <%- attributes.each do |attribute| -%>
+    = f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %>
+  <%- end -%>
+
+  .form-actions
+    = f.button :submit