Form for several objects

Hello, I have an application I did using RoR 1.1.6, now I wanna
migrate it to 2.0.2 but I found a problem. Before I had a form like
this:

<%= start_form_tag :action => 'update', :id => @user %>
<%= error_messages_for 'team' %>
<%= error_messages_for 'user_detail' %>
<%= error_messages_for 'user' %>

  <!--[form:user]-->
  <p><label for='team_name'>Team name</label><br/>
  <%= text_field 'team', :name, :size => 40 %></p>

  <p><label for='user_name'>Name</label><br/>
  <%= text_field 'user_detail', :name, :size => 40 %></p>

  <p><label for='user_surname'>Surname</label><br/>
  <%= text_field 'user_detail', :surname, :size => 40 %></p>

  <p><label for='user_email'>e-mail</label><br/>
  <%= text_field 'user_detail', :email, :size => 40 %></p>

  <p><label for='user_email_confirmation'>Confirm e-mail</label><br/>
  <%= text_field 'user_detail', :email_confirmation, :size => 40 %></

  <p><label for='user_username'>Username</label><br/>
  <%= text_field 'user', :username, :size => 40 %></p>

  <p><label for='user_password'>Password</label><br/>
  <%= password_field 'user', :password, :size => 40 %></p>

  <p><label for='user_password_confirmation'>Confirm password</

<br/>

  <%= password_field 'user', :password_confirmation, :size => 40 %></

  <!--[eoform:user]-->
  <%= submit_tag 'Edit' %>
<%= end_form_tag %>

Now, changing the deprecated tag to form_for I can only reference
attributes for User class, but not for Team and UserDetail classes.

In my controller I receive three hashes and I could do this:

    @user = User.new(params[:user])
    @user_detail = UserDetail.new(params[:user_detail])
    @team = Team.new(params[:team])
    @user.team = @team
    @user.user_detail = @user_detail

How could I do that now?

Well, I think I did a mistake, I have to use form_tag instead
form_for :). Isn't it?