Nested models, mass assignment problem.

Thank you in advance.

I am trying to use mass assignment for nested models in my view. The
first nested level works (thanks to a Railscast).

i.e. Driver.cars_attributes=>[{no=>...},{make=>...}] works but the
second level don't. I am trying to have, Driver.cars_attribute=>[{...},

Right now photo_attributes is empty when the form is submitted (i.e.

Parameters: {"commit"=>"Create",
"action"=>"create", "controller"=>"drivers",
"driver"=>{"occupation"=>"Gamer", "biography"=>"",
"car_attributes"=>[{"number"=>"5", "make"=>"Kong",
"photo_attributes"=>[], "model"=>"Buster"}], "nickname"=>"JRTong",
"birthdate(1i)"=>"1960", "birthdate(2i)"=>"3", "birthdate(3i)"=>"18",
"sponsors"=>"Ford", "first_name"=>"Jackson", "last_name"=>"Tong",
"location"=>"PJ, Selangor", "division_ids"=>["2"]}}

My car partial:

  form_for (@driver)
  <% fields_for "driver[car_attributes][]", car do |car_form| %>
    <td><%= car_form.text_field :number, :class=>'no' %></td>
    <td><%= car_form.text_field :make %></td>
    <td><%= car_form.text_field :model %></td>
  <% end %>
    <th>Photo: </th>
    <td><%= file_field_tag "driver[car_attributes][][photo_attributes]
[]", :size=>17 %></td>


  # Virtual attributes for child model Car
  def car_attributes=(car_attributes)
     car_attributes.each do |attributes|


  # Virtual attribute for child model Photo (for mass-assignment)
  def photo_attributes=(photo_attributes)
     photo_attributes.each do |attributes|

  def new
    @title = "New Driver"
    @driver = do |car|

    respond_to do |format|
      format.html # new.html.erb
      format.xml { render :xml => @driver }

        <th><label for="cars">Cars: </label></th>
          <fieldset id="cars" class="sub_form">
            <legend>Enter car details</legend>
              <%= render :partial => 'car', :collection => %>
          <%= add_car_link "Insert a car" %>

I will really appreciate your help.