Permalink
Browse files

Occasionally (ie. simple_form) will pass in a 'type' that is a symbol…

… and dup'ing symbols is bad so we now force it to a string
  • Loading branch information...
1 parent 3dca3b3 commit 3cecc557bd0d1c5644d4b31ef73616ef70687505 @phallstrom phallstrom committed Aug 4, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/form_helper_css.rb
View
4 lib/form_helper_css.rb
@@ -14,9 +14,9 @@ def css_options_for_tag(name, options={})
elsif name == :input and options['type']
return options if (options['type'] == 'hidden')
if FORM_HELPER_CSS_OPTIONS[:append] && options['class']
- options['class'] << ' ' + options['type'].dup
+ options['class'] << ' ' + options['type'].to_s.dup
else
- options['class'] = options['type'].dup
+ options['class'] = options['type'].to_s.dup
end
options['class'] << ' button' if ['submit', 'reset'].include? options['type']
options['class'] << ' text' if options['type'] == 'password'

0 comments on commit 3cecc55

Please sign in to comment.