You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: bookmarks_controller.rb
    path of file: ./repos/discourse/app/controllers
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class 
    
  def update
    params.require(:id)
    params.permit(:id, :name, :reminder_at, :auto_delete_preference)

    bookmark_manager = BookmarkManager.new(current_user)
    bookmark_manager.update(
      bookmark_id: params[:id],
      name: params[:name],
      reminder_at: params[:reminder_at],
      options: {
        auto_delete_preference: params[:auto_delete_preference],
      },
    )

    return render json: success_json if bookmark_manager.errors.empty?

    render json: failed_json.merge(errors: bookmark_manager.errors.full_messages), status: 400
  end