instance method
preventing_writes?
Ruby on Rails 8.1.2
Since v6.0.6Signature
preventing_writes?()
Determines whether writes are currently being prevented.
Returns true if the connection is a replica or returns the value of current_preventing_writes.
Source
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 245
def preventing_writes?
return true if replica?
return false if connection_descriptor.nil?
connection_descriptor.current_preventing_writes
end
Defined in activerecord/lib/active_record/connection_adapters/abstract_adapter.rb line 245
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::AbstractAdapter