diff --git a/lib/twitter_bootstrap_form_for/form_builder.rb b/lib/twitter_bootstrap_form_for/form_builder.rb index fbf01f5..ca0a01f 100644 --- a/lib/twitter_bootstrap_form_for/form_builder.rb +++ b/lib/twitter_bootstrap_form_for/form_builder.rb @@ -161,12 +161,12 @@ class TwitterBootstrapFormFor::FormControls < ActionView::Helpers::FormBuilder tag = add_on.present? ? :div : :span classes = [ "input", add_on ].compact.join('-') - template.content_tag(tag, :class => classes) do + template.concat(template.content_tag(tag, :class => classes) do block.call if block.present? && add_on == :prepend template.concat super attribute, *(args << options) block.call if block.present? && add_on != :prepend - template.concat self.error_span(attribute) if self.errors_on?(attribute) - end + end) + template.concat(self.error_span(attribute)) if self.errors_on?(attribute) end end