title: Wrong number of arguments for a helper
body: <p>I'm trying to generate a form from a parsed json (in Hash form) with this helper</p>
  
  <pre><code>def hash_to_form(hash, fields, legend)
      fields.fields_for do |b|
        concat('&lt;fieldset&gt;&lt;legend&gt;', legend, '&lt;/legend&gt;')
        hash.each do |key, attr|
          if hash[key].is_a? Hash
            hash_to_form(hash[key], b, key)
          else
            concat("&lt;div class=\"field\"&gt;")
            concat(b.label(key, key))
            concat(b.text_field(key, :value =&gt; attr))
            concat("&lt;/div&gt;")
          end
        end
      end
    end
  </code></pre>
  
  <p>But it's giving me an wrong number of argument( 0 for 1) when i try to call the helper method. Which makes no sense since it takes 3 arguments?</p>