1
1
# frozen_string_literal: true
2
2
3
+ # rubocop:disable Rails/HelperInstanceVariable
3
4
module MaterialFormsHelper
4
5
class MaterialFormBuilder < ActionView ::Helpers ::FormBuilder
5
6
def validation_message ( attribute )
@@ -11,17 +12,17 @@ def validation_message(attribute)
11
12
)
12
13
end
13
14
14
- def text_field ( attribute , options = { } )
15
+ def text_field ( attribute , options = { } )
15
16
options = append_material_class ( options )
16
17
super
17
18
end
18
19
19
- def email_field ( attribute , options = { } )
20
+ def email_field ( attribute , options = { } )
20
21
options = append_material_class ( options )
21
22
super
22
23
end
23
24
24
- def telephone_field ( attribute , options = { } )
25
+ def telephone_field ( attribute , options = { } )
25
26
options = append_material_class ( options )
26
27
super
27
28
end
@@ -37,7 +38,7 @@ def select(attribute, choices = nil, options = {},
37
38
super
38
39
end
39
40
40
- def submit ( value = nil , options = { } )
41
+ def submit ( value = nil , options = { } )
41
42
options = append_material_class ( options , 'btn btn-primary' )
42
43
super
43
44
end
@@ -53,3 +54,5 @@ def append_material_class(options = {}, html_class = 'form-control')
53
54
end
54
55
end
55
56
end
57
+
58
+ # rubocop:enable Rails/HelperInstanceVariable
0 commit comments