Skip to content

Commit

Permalink
Stop css classes from building up and duplicating
Browse files Browse the repository at this point in the history
  • Loading branch information
ebonical committed Mar 1, 2012
1 parent 2830fd3 commit 14472d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/simple_form/inputs/base.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def reflection_or_attribute_name
def html_options_for(namespace, css_classes) def html_options_for(namespace, css_classes)
html_options = options[:"#{namespace}_html"] || {} html_options = options[:"#{namespace}_html"] || {}
css_classes << html_options[:class] if html_options.key?(:class) css_classes << html_options[:class] if html_options.key?(:class)
html_options[:class] = css_classes html_options[:class] = css_classes.flatten.uniq
html_options html_options
end end


Expand Down

0 comments on commit 14472d2

Please sign in to comment.