title: Rails Paperclip: update vs. update_attributes
body: <p>I realized something quite strange when attempting to upload an image via the paperclip gem for my user model (under the avatar attribute). For some reason there User.update and @user.update_attributes behaves differently. Does anyone know why this is so?</p>
  <pre><code>#using @user.update_attributes(user_avatar_params)
  def update_profile_pic
      @user = User.find(params[:id])
      @user.update_attributes(user_avatar_params)
      puts @user.avatar_file_name.nil? # prints false as expected
      respond_to do |format|
        format.html { redirect_to :back }
        format.js
      end
  end
  
  #using User.update(@user.id, user_avatar_params)
  def update_profile_pic
      @user = User.find(params[:id])
      User.update(@user.id, user_avatar_params)
      puts @user.avatar_file_name.nil? # prints true although successfully saves
      respond_to do |format|
        format.html { redirect_to :back }
        format.js
      end
  end
  </code></pre>
  <p>And here is my strong params in the user_controller.rb</p>
  <pre><code>def user_avatar_params
    params.require(:user).permit(:avatar)
  end
  </code></pre>