superform 0.5.1 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,31 +0,0 @@
1
- class ApplicationForm < Superform::Rails::Form
2
- include Phlex::Rails::Helpers::Pluralize
3
-
4
- def row(component)
5
- div do
6
- render component.field.label(style: "display: block;")
7
- render component
8
- end
9
- end
10
-
11
- def around_template(&)
12
- super do
13
- error_messages
14
- yield
15
- submit
16
- end
17
- end
18
-
19
- def error_messages
20
- if model.errors.any?
21
- div(style: "color: red;") do
22
- h2 { "#{pluralize model.errors.count, "error"} prohibited this post from being saved:" }
23
- ul do
24
- model.errors.each do |error|
25
- li { error.full_message }
26
- end
27
- end
28
- end
29
- end
30
- end
31
- end