method

current_preventing_writes

Importance_1
v7.1.3.4 - Show latest stable - 0 notes - Class: Core
current_preventing_writes() public

Returns the symbol representing the current setting for preventing writes.

ActiveRecord::Base.connected_to(role: :reading) do
  ActiveRecord::Base.current_preventing_writes #=> true
end

ActiveRecord::Base.connected_to(role: :writing) do
  ActiveRecord::Base.current_preventing_writes #=> false
end
Show source
Register or log in to add new notes.