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: chapter.rb
    path of file: ./repos/kitsu-server/app/models
    
    the code of the file until where you have to start completion: class Chapter < ApplicationRecord
  include Titleable
  include DescriptionSanitation
  include UnitThumbnailUploader::Attachment(:thu
    
  def self.create_defaults(count)
    chapters = ((1..count).to_a - pluck(:number)).map do |n|
      new(number: n, volume_number: 1)
    end
    transaction { chapters.each(&:save) }
    where("number > #{count}").destroy_all
  end