#359 - use no top level wrapper - don't clobber :tag => false
This commit is contained in:
parent
01ba454502
commit
8128143a55
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue