title: simple_form custom input with custom wrapper
body: <p>I'm trying to make a custom input for currency in my app. I had those bootstrap wrappers and etc (I think it comes with simple_form or with bootstrap gem...), so, I could do something like:</p>
  
  <pre><code>&lt;%= f.input :cost, wrapper =&gt; :append do %&gt;
        &lt;%= content_tag :span, "$", class: "add-on" %&gt;
        &lt;%= f.number_field :cost %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>And it works just as expected. The thing is: I need this same thing in a lot of places, and I don't want to copy/paste it all around.</p>
  
  <p>So, I decided to create a custom input.</p>
  
  <p>Until now, I got the following code:</p>
  
  <pre><code>class CurrencyInput &lt; SimpleForm::Inputs::Base
  
    def input
      input_html_classes.unshift("string currency")
      input_html_options[:type] ||= input_type if html5?
  
      @builder.input attribute_name, :wrapper =&gt; :append do |b|
        # content_tag(:span, "$", class: "add-on")
        b.text_field(attribute_name, input_html_options)
      end
    end
  end
  </code></pre>
  
  <p>But I got some errors. Looks like the <code>b</code> doesn't came as expected, so, it just don't work.</p>
  
  <p>Is it really possible to do this? I could't find any example and can't make it work by myself.</p>
  
  <p>Thanks in advance.</p>