Why am I still getting the error "Can't mass-assign protected attributes: contacts"
===

When I try to make new Girl record with leaving mail field blank, I get this error.  
The mail field is nested.

When it's not input, I just want it to make only Girl record without creating contact record.  
And when it's filled with something, I want it to make both Girl and Contact record.   
When it's update, I want it do the same thing.  
How can I do that??? What's wrong with my code?

My View

    <%= form_for(@girl) do |f| %>
      <% if @girl.errors.any? %>
        <div id="error_explanation">
          <h2><%= pluralize(@girl.errors.count, "error") %> prohibited this girl from being saved:</h2>
    
          <ul>
          <% @girl.errors.full_messages.each do |msg| %>
            <li><%= msg %></li>
          <% end %>
          </ul>
        </div>
      <% end %>
    
      <div class="field">
        <%= f.label :name_en %><br />
        <%= f.text_field :name_en %>
      </div>
      <div class="field">
        <%= f.label :name_ja %><br />
        <%= f.text_field :name_ja %>
      </div>
      <div class="field">
        <%= f.label :gender_id %><br />
        <%= f.number_field :gender_id %>
      </div>
      <div class="field">
        <%= f.label :job_type_id %><br />
        <%= f.number_field :job_type_id %>
      </div>
      <div class="field">
        <%= f.label :age %><br />
        <%= f.number_field :age %>
      </div>
      <div class="field">
        <%= f.fields_for :contacts do |contact| %>
        <%= f.label :mail %><br />
        <%= contact.text_field :mail %>
        <% end %>
      </div>
    
      <div class="field">
        <%= f.label :photo %><br />
        <%= f.file_field :photo %>
      </div>
    
        <div class="field">
          <%= f.label :tag_list, 'tag' %><br />
          <%= f.text_field :tag_list %>
        </div> 
    
      <div class="actions">
        <%= f.submit %>
      </div>
    <% end %>


My controller

      def new
    
        @girl = Girl.new
    
        respond_to do |format|
          format.html # new.html.erb
          format.json { render json: @girl }
        end
      end


      def create
    
        @girl = Girl.new(params[:girl])
    
        respond_to do |format|
          if @girl.save
            format.html { redirect_to @girl, notice: 'Girl was successfully created.' }
            format.json { render json: @girl, status: :created, location: @girl }
          else
            format.html { render action: "new" }
            format.json { render json: @girl.errors, status: :unprocessable_entity }
          end
        end
      end


      def update

        @girl = Girl.find(params[:id])
    
        respond_to do |format|
          if @girl.update_attributes(params[:girl])
            format.html { redirect_to @girl, notice: 'Girl was successfully updated.' }
            format.json { head :ok }
          else
            format.html { render action: "edit" }
            format.json { render json: @girl.errors, status: :unprocessable_entity }
          end
        end
      end


Girl model

    class Girl < ActiveRecord::Base
      has_many :users
      has_one :contact
      accepts_nested_attributes_for :contact
      attr_accessible :id, :name_en, :name_ja, :gender_id, :job_type_id, :age, :contact_attributes, :photo, :tag_list
    
      searchable do 
        text :name_en, :name_ja
        text :contact do 
          contact.mail 
        end 
      end
    
        has_attached_file :photo,
         :styles => {
           :thumb=> "100x100>",
           :small  => "400x400>" } 
    
      acts_as_taggable_on :tags
      acts_as_commentable
    
    
    end


Contact model

    class Contact < ActiveRecord::Base
      belongs_to :girl, :class_name => "Girl"
      accepts_nested_attributes_for :girl
      attr_accessible :mail
    
    end

