title: Rails 3 - Update_attribues won't get changed parameters
body: <p>i have somes relations in my table like this</p>
  
  <pre><code>Model : Floors
      has_many :photo
  
  Model : Photo
       belongs_to :floors
       belongs_to :file_type
  
  Model : file_type
       has_many :photo
  </code></pre>
  
  <p>Photo are nested attributes with render inside floors form.</p>
  
  <p>The problem is if i change the file type inside the form without any other change in the form, the new selected alements are not updated, and the update_attributes (in the WEBrick) console, the new selected are not updated. </p>
  
  <p>Photo are a paperclip element with versioning. I don't want to update each time the file if i just want to change his file type related.</p>
  
  <p>Thanks for your help.</p>
  
  <p>EDIT : Has asked, my views.</p>
  
  <pre><code># _form.html.erb
  &lt;% f.fields_for :floor_photo do |floor_photo| -%&gt;
     &lt;%= render 'floor_photo_fields', :f =&gt; floor_photo %&gt;
  &lt;% end -%&gt;
  &lt;div&gt;
      &lt;%= link_to_add_fields "Add Photo", f, :floor_photo %&gt;
  &lt;/div&gt;
  
  # _floor_photo_fields.html.erb
  &lt;div class="fields"&gt;
    &lt;%= f.label 'Photo' %&gt;&lt;br/&gt;
    &lt;%= f.file_field :photo %&gt;
    &lt;%= f.collection_select :file_type_id, FileType.all(:order =&gt; 'name'), :id, :name,   {:prompt =&gt; 'Select'}%&gt;
    &lt;%= link_to_remove_fields "remove", f %&gt;&lt;br/&gt;
    &lt;div style="margin-bottom:10px;"&gt;&lt;%= f.object.photo_file_name %&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>For now, if i click Add Photo, and set a file type to the photo, it's work, but when i edit a floors and want to change the file type, he don't want to take the new file_type_id and don't do any update sql statement. Like if i have nothing changed in my form.</p>
  
  <p>And yes, sorry for my relations, it was a typo mistake, all are good in my models form. </p>
  
  <pre><code># floor_photo.rb
  class FloorPhoto &lt; ActiveRecord::Base
    versioned
    belongs_to :floor
    belongs_to :file_type
  
    has_attached_file :photo, :keep_old_files =&gt; true, :url =&gt; "/system/buildings/photos/:id/:version/:basename.:extension",
    :path =&gt; ":rails_root/public/system/buildings/photos/:id/:version/:basename.:extension"
  
  
    Paperclip.interpolates :version do |attachment, style|
      attachment.instance.version.to_s
    end
  end
  
  
  # file_type.rb
  class FileType &lt; ActiveRecord::Base
    has_many :floor_photos
  end
  </code></pre>
  
  <p>I hope this help someone to help me.</p>
  
  <p>Sorry, here is my controller</p>
  
  <pre><code>floors_controllers.rb
  def edit
  @floor = Floor.find(params[:id])
  end
  
  def update
  @floor = Floor.find(params[:id])
  if @floor.update_attributes(params[:floor])
    redirect_to space_path(@floor)
  else 
    render :action =&gt; 'edit'
  end
  end
  </code></pre>