A: 

Hi Nicholas,

I would look into the accepts_nested_attributes_for function. You might have something like:

class Project < ActiveRecord::Base
  has_one :team
  accepts_nested_attributes_for :team

  # also this will be useful
  validates_associated :team
end

In your forms you will want to use the fields_for method to nest your attributes. That might look something like:

<% form_for(@project) do |p| %>
  <%= p.error_messages %>
  <!-- Project name -->
  <%= p.text_field :name %>

  <% f.fields_for(@project.team) do |t| %>
    <!-- Team Name -->
    <%= t.text_field :name %>
  <% end %>

  <%= f.submit 'Create Project' %>
<% end %>

When you submit the form you will be able to call @project.update_attributes(params[:project]) and it will work. You can also raise params.inspect to see how the params are nested.

Hope this helps.

DJTripleThreat
Thanks for the answer. Actually, in the controller, I wanted to use @project.attributes=params[:project], then modify some fields, and only then save. (so not using directly @project.update_attributes). But it didn't work with Rails 2.3.8. I finally found the reason (https://rails.lighthouseapp.com/projects/8994/tickets/4766-nested_attributes-fails-to-updatedestroy-when-association-is-loaded-between-setting-attributes-and-saving-parent)
Nicolas M.
Nicolas, you should add this as an answer and answer your own question if this is the problem. I think this bug is also the same problem I'm having as well.
DJTripleThreat