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: wiki_page.rb
    path of file: ./repos/e621ng/app/models
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class WikiPage < ApplicationRecord
  class RevertError < Excepti
    
  def validate_rename
    return if !will_save_change_to_title? || skip_secondary_validations

    tag_was = Tag.find_by_name(Tag.normalize_name(title_was))
    if tag_was.present? && tag_was.post_count > 0
      errors.add(:title, "cannot be changed: '#{tag_was.name}' still has #{tag_was.post_count} posts. Move the posts and update any wikis linking to this page first.")
    end