title: rails fields_for does not render after validation error on nested form
body: <p>I have a nested form problem. I implemented the nested forms solution form the railscasts 196 &amp; 197. It works if I have no validation errors.</p>
  
  <p>So, form renders perfectly when it is loaded, including the nested fields (in the fields_for part).</p>
  
  <p>But, the form has validations. When a validation fails, the controller does render :new. Then the form renders the linked model fields ok, but the nested fields are not anymore rendered. Is there a solution for this?</p>
  
  <p>the controller</p>
  
  <pre><code>  def new
      @property = Property.new
      @property.images.build
    end
  
    def create
      @property = Property.new(params[:property])
      if @property.save
        flash[:success] = t('Your_property') + ' ' + t('is_successfully_created')
        redirect_to myimmonatie_url
      else
        render :action =&gt; 'new'
      end
    end
  </code></pre>
  
  <p>part of the view:</p>
  
  <pre><code>&lt;% form_for :property, @property, :url =&gt; { :action =&gt; "create" }, :html =&gt; { :multipart =&gt; true } do |f| %&gt;
    &lt;div id="new-property-form-spannedcols"&gt;
        &lt;div class="formField inptRequired"&gt;
          &lt;%= f.label :postal_code, t("Postal_code") %&gt;
          &lt;%= f.text_field :postal_code, :class =&gt; 'inptMedium short' %&gt;
        &lt;/div&gt;
        &lt;div id="city_row" class="formField inptRequired"&gt;
          &lt;%= f.label :city, t("City") %&gt;
          &lt;div id="city_cell"&gt;
            &lt;%= render :partial =&gt; 'ajax/cities', :locals =&gt; { :postal_code =&gt; @property.postal_code } %&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  
        ...
  
        &lt;% f.fields_for :images do |builder| %&gt;
          &lt;div class="formField"&gt;
            &lt;%= builder.label :photo, t("Photo_path_max_3mb") %&gt;
            &lt;%= builder.file_field :photo, :class =&gt; 'inptMedium' %&gt;
            &lt;%= builder.hidden_field :order, :value =&gt; "1" %&gt;
          &lt;/div&gt;
        &lt;% end %&gt;
    &lt;/div&gt; &lt;!-- /new-property-form-spannedcols --&gt;
    &lt;div class="formBtn"&gt;
      &lt;%= f.submit t("Save"), :class =&gt; 'btnMedium bg-img-home' %&gt;&amp;nbsp;
    &lt;/div&gt; &lt;!-- /formBtn --&gt;
  &lt;%- end -%&gt;
  </code></pre>