Inserting default value for first nested builder item in form

So I’ve got a form and it’s has some accepts_nested_attributes_for items in it.

It’s a project, task thing and what I’m wondering is if I can put the person creating the project as the leader (default first value for project_member) in the form itself or if this is something that should be handled on the create method of the controller.

Here’s the new action on the project controller

  def new
    @project =
    3.times {}
    3.times {}
    3.times {}
    respond_to do |format|
      format.html {render :layout => "base"}
      format.js {render :layout => false}

So basically, when building the project_members field, I’m wanting to be able to grab the person creating the form (based on session[:user]) and insert them as the first field in the list.

Any help or pointers to some kind of tutorial is REALLY appreciated.

I would definitely do that in the create method, not in the form itself. Just use whatever current_user method your authentication system is using.

that’s what I was thinking was the best idea.