Skip to content

Commit d944ba7

Browse files
committed
Remove invalid html attributes for inputs
1 parent cb84c41 commit d944ba7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/activeadmin_addons/support/input_base.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ def to_html
1616
end
1717

1818
def input_html_options
19-
super.merge(control_attributes)
19+
# maxwidth and size are added by Formtastic::Inputs::StringInput
20+
# but according to the HTML standard these are not valid attributes
21+
# on the inputs provided by this module
22+
super.except(:maxlength, :size).merge(control_attributes)
2023
end
2124

2225
def parts_to_html

0 commit comments

Comments
 (0)