plataformatec/simple_form — pull request #675 by coreyti (2012-10-10 06:39:30+00:00)
Title: Add rendering check for namespaced  components

given a namespaced, complex wrapper:

b.wrapper :error, :tag => 'div', :class => 'tooltip' do |tip|
e.wrapper :tag => 'div', :class => 'inner' do |inner|
inner.use :error, :wrap_with => {
:tag => 'span',
:class => 'error'
}
end
end

if input responds to the namespace and it responds **with** nil, the entire component will not be rendered.

without this change, the following html would be rendered when there is no error:

with this change, `input.error` will respond with `nil` when there are no errors and the error/tooltip html will not, therefore, be rendered.