title: Rails 3.1 not rendering the fields_for from nested_form
body: <p>I have a project model that <code>has_many :tasks</code>. I added a nested resource in rails 3.1 and try now with the <a href="https://github.com/ryanb/nested_form" rel="noreferrer">nested_form</a> gem to be able to add/delete tasks when editing a project.</p>
  
  <p>I used nested_form before in another Rails3 application and it worked fine, but now my <code>fields_for</code> part does not render anything.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>#project.rb
  class Project &lt; ActiveRecord::Base
  
    attr_accessible :nr, :name, :client_id, :project_status_id, :hidden, :active, :description, :tasks_attributes
  
  
    has_many :tasks, :dependent =&gt; :destroy
    accepts_nested_attributes_for :tasks, :reject_if =&gt; lambda { |a| a[:name].blank? }, :allow_destroy =&gt; true
  
  
  end
  
  
  #task.rb
  class Task &lt; ActiveRecord::Base
  
    belongs_to :project
  
  end
  
  #views/projects/_form.html.erb
  &lt;%= simple_nested_form_for @project do |form| %&gt;
  
    &lt;%= form.input :nr, :label =&gt; 'Nr' %&gt;
    &lt;%= form.input :name, :label =&gt; 'Name' %&gt;
    &lt;%= form.association :client, :collection =&gt; Client.all(:order =&gt; 'name'), :prompt =&gt; "Choose a Client" %&gt;
    &lt;%= form.input :description, :label =&gt; 'Description' %&gt;
    &lt;%= form.input :active, :label =&gt; 'Active' %&gt;
    &lt;%= form.input :hidden, :label =&gt; 'Hidden' %&gt;
    &lt;div class="task_fields"&gt;
      &lt;%= form.fields_for :tasks do |task_form| %&gt;
        &lt;%= task_form.input :name %&gt;
        &lt;%= task_form.input :description  %&gt;
        &lt;%= task_form.input :deadline %&gt;
        &lt;%= task_form.link_to_remove "Remove this task" %&gt;
        &lt;p&gt;&lt;%= form.link_to_add "Add a task", :tasks %&gt;&lt;/p&gt;
       &lt;% end %&gt;
    &lt;/div&gt;
    &lt;div class="actions"&gt;
      &lt;%= form.button :submit %&gt;
    &lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>and in my routes:</p>
  
  <pre><code>  resources :posts do 
      resources :comments
    end
  </code></pre>
  
  <p>but when I visit the page in my browser the</p>
  
  <pre><code>&lt;div class="task_fields"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>is rendered empty. no fields_for and whatsoever. the nested_form.js is loaded and I point in my GEMFILE to <code>gem "nested_form", :git =&gt; 'https://github.com/fxposter/nested_form.git'</code>, as I read somewhere I need to do this in order to get simple_form support. I tried also to change simple_nested_form_for to only nested_form_for with no effect.</p>
  
  <p>Any help higly appreciated</p>