class SlavePools::Config
Attributes
defaults_to_master[RW]
When true, all queries will go to master unless wrapped in with_pool{}. When false, all safe queries will go to the current replica unless wrapped in with_master{}. Defaults to false.
environment[RW]
The current environment. Normally set to Rails.env, but will default to 'development' outside of Rails apps.
safe_methods[RW]
The list of methods considered safe to send to a readonly connection. Defaults are based on Rails version.
Public Class Methods
new()
click to toggle source
# File lib/slave_pools/config.rb, line 16 def initialize @environment = 'development' @defaults_to_master = false @safe_methods = [] end