Skip to content

Rails 8.1 deprecated AbstractAdapter#check_if_write_query() method, which breaks compatibility of this library #1

@lancedikson

Description

@lancedikson

Problem

Rails 8.1 deprecated AbstractAdapter#check_if_write_query() method, which breaks compatibility of this library.

The original method code is this:

  def check_if_write_query(sql)
    return unless preventing_writes? && write_query?(sql)

    raise ActiveRecord::ReadOnlyError, "Write query attempted while in readonly mode: #{sql}"
  end

You can reimplement the same method for the 8.0-related adapter, but only if it doesn't exist yet in the runtime from the AbstractAdapter.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions