lib/merb-helpers/form/builder.rb in merb-helpers-1.1.0.rc1 vs lib/merb-helpers/form/builder.rb in merb-helpers-1.1.0
- old
+ new
@@ -260,12 +260,12 @@
value = Merb::Parse.escape_xml(value)
end
option_attrs = {:value => value}
if sel.is_a?(Array)
- option_attrs.merge!(:selected => "selected") if value.in? sel
+ option_attrs.merge!(:selected => "selected") if value.in? sel.map {|e| e.to_s }
else
- option_attrs.merge!(:selected => "selected") if value == sel
+ option_attrs.merge!(:selected => "selected") if value == sel.to_s
end
tag(:option, text, option_attrs)
end).join
end