Module: Slavery
- Defined in:
- lib/slavery.rb,
lib/slavery/base.rb,
lib/slavery/error.rb,
lib/slavery/version.rb,
lib/slavery/transaction.rb,
lib/slavery/connection_holder.rb
Defined Under Namespace
Classes: Base, ConnectionHolder, Error, Transaction
Constant Summary collapse
- VERSION =
'2.1.0'
Class Attribute Summary collapse
-
.disabled ⇒ Object
Returns the value of attribute disabled.
- .spec_key ⇒ Object
Class Method Summary collapse
Class Attribute Details
.disabled ⇒ Object
Returns the value of attribute disabled.
14 15 16 |
# File 'lib/slavery.rb', line 14 def disabled @disabled end |
.spec_key ⇒ Object
17 18 19 |
# File 'lib/slavery.rb', line 17 def spec_key @spec_key ||= "#{ActiveRecord::ConnectionHandling::RAILS_ENV.call}_slave" end |
Class Method Details
.connection_holder ⇒ Object
16 17 18 19 20 21 |
# File 'lib/slavery/connection_holder.rb', line 16 def connection_holder @connection_holder ||= begin ConnectionHolder.activate ConnectionHolder end end |