method
current_preventing_writes
rails latest stable - Class:
ActiveRecord::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