title: form_for non-AR model - fields_for Array attribute doesn't iterate
body: <p>I'm having trouble getting <code>fields_for</code> to work on an Array attribute of a non-ActiveRecord model.</p>
  
  <p>Distilled down, I have to following:</p>
  
  <p>models/parent.rb</p>
  
  <pre><code>class Parent
    extend ActiveModel::Naming
    include ActiveModel::Conversion
    include ActiveModel::Validations
    extend ActiveModel::Translation
  
    attr_accessor :bars
  end
  </code></pre>
  
  <p>controllers/parent_controller.rb</p>
  
  <pre><code>def new_parent
    @parent = Parent.new
  
    @parent.bars = ["hello", "world"]
    render 'new_parent'
  end
  </code></pre>
  
  <p>views/new_parent.html.haml</p>
  
  <pre><code>= form_for @parent, :url =&gt; new_parent_path do |f|
    = f.fields_for :bars, @parent.bars do |r|
      = r.object.inspect
  </code></pre>
  
  <p>With the code as above, my page contains <code>["hello", "world"]</code> - that is, the result of <code>inspect</code> called on the Array assigned to <code>bars</code>. (With <code>@parent.bars</code> omitted from the <code>fields_for</code> line, I just get <code>nil</code> displayed).</p>
  
  <p>How can I make <code>fields_for</code> behave as for an AR association - that is, perform the code in the block once for each member of my <code>bars</code> array?</p>