title: fields_for not creating a record when making a new parent record
body: <p>I am trying to automatically create a child record (Participant) when I create a parent (Project) record. I can create the parent (Project) fine and, on other forms, I can create the child (Participant).  I cannot seem to create the child (Participant) at the same time as the parent.<br></p>
  
  <p>I am on Rails 4, and so I've set my strong params carefully.  I just don't understand what I'm doing wrong.<br><br>
  Parent Controller:<br><br></p>
  
  <pre><code>class ProjectsController &lt; ApplicationController
  
    def new_project
      @title = params[:ti]
      @project = Project.new  
      @project.participants.build
    end
  
  
  def create_project
    @project = Project.new(project_params)
    @template = Template.find(params[:t]) 
     @project.participants.build
     @title = params[:ti]
    respond_to do |format|
       if @project.save
          @project.participants.save
          format.html { redirect_to new_milestones_path(:p =&gt; @project.id), notice: 'Great! We saved your project details.' }
        else
          format.html {   redirect_to  new_project_path(t: @template.id, ti: @title)         
   }
          format.json { render json: @project.errors, status: :unprocessable_entity }
        end
      end
    end
  
    def project_params
      params.require(:project).permit( :id, :title, :starts, participants_attributes: [:id, :email, :title, :status, :project_id])
    end
  end
  </code></pre>
  
  <p>Models:<br><br></p>
  
  <pre><code> class Participant &lt; ActiveRecord::Base
     belongs_to :project, inverse_of: :participants
     ........
   end
  
   class Project &lt; ActiveRecord::Base
     has_many :participants, dependent: :destroy, inverse_of: :project
     accepts_nested_attributes_for :participants, allow_destroy: true, reject_if: proc { |a| a["email"].blank? }
     .........
   end
  </code></pre>
  
  <p>Form:<br><br></p>
  
  <pre><code> &lt;%= form_for @project, url: create_project_path(ti: @title), html: { :multipart =&gt; true, :class=&gt; "form-horizontal", id: "basicForm" }do |f| %&gt; 
  
     &lt;%= f.fields_for :participants do |ff|%&gt;
  
       &lt;%= ff.hidden_field :email, :value =&gt; current_user.email %&gt;
       &lt;%= ff.hidden_field :title, :value =&gt; 'Organizer' %&gt;
       &lt;%= ff.hidden_field :status, :value =&gt; 'accepted' %&gt;
  
     &lt;% end %&gt; 
     &lt;%=  f.text_field  :title, :placeholder =&gt; 'Your Project Title'%&gt;
     &lt;%=  f.text_field  :starts, :placeholder =&gt; 'mm/dd/yyyy'%&gt;
  
     &lt;%= f.submit ' SAVE PROJECT' %&gt;  
   &lt;% end %&gt;
  </code></pre>
  
  <p><strong>UPDATE:</strong>
  I added @project.participants.build as Samo suggested (and I've updated my code above), which makes the fields_for visible...but my project doesn't save...it redirects back to new_project_path. </p>