#359 - use no top level wrapper - don't clobber :tag => false

This commit is contained in:
Ben Mishkin 2011-11-09 09:34:21 -05:00 committed by Rafael Mendonça França
parent 01ba454502
commit 8128143a55
2 changed files with 2 additions and 2 deletions

View File

@ -142,7 +142,7 @@ module SimpleForm
# Builds a new wrapper using SimpleForm::Wrappers::Builder.
def self.build(options={})
options[:tag] ||= :div unless options.empty?
options[:tag] = :div if !options.empty? && options[:tag].nil?
builder = SimpleForm::Wrappers::Builder.new
yield builder
SimpleForm::Wrappers::Root.new(builder.to_a, options)

View File

@ -35,7 +35,7 @@ module SimpleForm
name, options = nil, name if name.is_a?(Hash)
builder = self.class.new
options ||= {}
options[:tag] ||= :div
options[:tag] = :div if options[:tag].nil?
yield builder
@components << Many.new(name, builder.to_a, options)
elsif options