def optional(name, options=nil, &block)
if block_given?
ActiveSupport::Deprecation.warn "Passing a block to optional is deprecated. " \
"Please use wrapper instead of optional."
return wrapper(name, options, &block)
end
if options && options.keys != [:wrap_with]
ActiveSupport::Deprecation.warn "Passing :tag, :class and others to optional is deprecated. " \
"Please invoke b.optional #{name.inspect}, :wrap_with => #{options.inspect} instead."
options = { :wrap_with => options }
end
@options[name] = false
use(name, options, &block)
end