Fixes issue where html options continue to get duplicated #490

Merged
merged 2 commits into from Apr 21, 2012
View
2 lib/simple_form/inputs/base.rb
@@ -100,7 +100,7 @@ def reflection_or_attribute_name
# Retrieve options for the given namespace from the options hash
def html_options_for(namespace, css_classes)
- html_options = options[:"#{namespace}_html"] || {}
+ html_options = (options[:"#{namespace}_html"] || {}).dup
css_classes << html_options[:class] if html_options.key?(:class)
html_options[:class] = css_classes
html_options