Repository: rails/rails
File: activerecord/lib/active_record.rb (Ruby)

Code before:
  singleton_class.attr_accessor :raise_int_wider_than_64bit
  self.raise_int_wider_than_64bit = true

  ##
  # :singleton-method: yaml_column_permitted_classes
  # Application configurable array that provides additional permitted classes
  # to Psych safe_load in the YAML Coder
  singleton_class.attr_accessor :yaml_column_permitted_classes
  self.yaml_column_permitted_classes = [Symbol]

  ##
  # :singleton-method: generate_secure_token_on
  # Controls when to generate a value for <tt>has_secure_token</tt>
  # declarations. Defaults to <tt>:create</tt>.
  singleton_class.attr_accessor :generate_secure_token_on
  self.generate_secure_token_on = :create

  ##
  # :singleton-method: use_legacy_signed_id_verifier
  # This option allows for a smooth transition during the deprecation of the legacy +signed_id_verifier+. It supports the following modes:
  # - +:generate_and_verify+ (default) – Generates signed IDs using the legacy format while verifying both the new and legacy formats.
  # - +:verify+ – Generates signed IDs using the new format while verifying both the new and legacy formats.

  # Note: The new format is not URL-safe unless +Rails.application.message_verifiers+ is configured with +url_safe: true+.
  singleton_class.attr_accessor :use_legacy_signed_id_verifier
  self.use_legacy_signed_id_verifier = :generate_and_verify

  def self.marshalling_format_version
    Marshalling.format_version
  end

  def self.marshalling_format_version=(value)
    Marshalling.format_version = value
  end

  ##
  # :singleton-method: protocol_adapters
  # Provides a mapping between database protocols/DBMSs and the
  # underlying database adapter to be used. This is used only by the
  # <tt>DATABASE_URL</tt> environment variable.
  #
  # == Example
  #
  #   DATABASE_URL="mysql://myuser:mypass@localhost/somedatabase"
  #
  # The above URL specifies that MySQL is the desired protocol/DBMS, and the
  # application configuration can then decide which adapter to use. For this example
  # the default mapping is from <tt>mysql</tt> to <tt>mysql2</tt>, but <tt>:trilogy</tt>
  # is also supported.
  #
  #   ActiveRecord.protocol_adapters.mysql = "mysql2"

Review comment (suggestion):
I don't think we need this, right?  We only use `config.active_record.use_legacy_signed_id_verifier`.

You can add `:use_legacy_signed_id_verifier` to [this list](https://github.com/rails/rails/blob/bf80199d4890441465ed12623b09f2324aaf234e/activerecord/lib/active_record/railtie.rb#L221-L236) to prevent `NoMethodError`.

Code after:
  # is wider than signed 64bit representation
  singleton_class.attr_accessor :raise_int_wider_than_64bit
  self.raise_int_wider_than_64bit = true

  ##
  # :singleton-method: yaml_column_permitted_classes
  # Application configurable array that provides additional permitted classes
  # to Psych safe_load in the YAML Coder
  singleton_class.attr_accessor :yaml_column_permitted_classes
  self.yaml_column_permitted_classes = [Symbol]

  ##
  # :singleton-method: generate_secure_token_on
  # Controls when to generate a value for <tt>has_secure_token</tt>
  # declarations. Defaults to <tt>:create</tt>.
  singleton_class.attr_accessor :generate_secure_token_on
  self.generate_secure_token_on = :create

  def self.marshalling_format_version
    Marshalling.format_version
  end

  def self.marshalling_format_version=(value)
    Marshalling.format_version = value
  end

  ##
  # :singleton-method: protocol_adapters
  # Provides a mapping between database protocols/DBMSs and the
  # underlying database adapter to be used. This is used only by the
  # <tt>DATABASE_URL</tt> environment variable.
  #
  # == Example
  #
  #   DATABASE_URL="mysql://myuser:mypass@localhost/somedatabase"
  #
  # The above URL specifies that MySQL is the desired protocol/DBMS, and the
  # application configuration can then decide which adapter to use. For this example
  # the default mapping is from <tt>mysql</tt> to <tt>mysql2</tt>, but <tt>:trilogy</tt>
  # is also supported.
  #
  #   ActiveRecord.protocol_adapters.mysql = "mysql2"
  #
  # The protocols names are arbitrary, and external database adapters can be
  # registered and set here.
  singleton_class.attr_accessor :protocol_adapters
  self.protocol_adapters = ActiveSupport::InheritableOptions.new(
    {
      sqlite: "sqlite3",
      mysql: "mysql2",
      postgres: "postgresql",