Module: DbCharmer
- Defined in:
- lib/db_charmer.rb,
lib/db_charmer/db_magic.rb,
lib/db_charmer/multi_db_proxy.rb,
lib/db_charmer/connection_proxy.rb,
lib/db_charmer/finder_overrides.rb,
lib/db_charmer/association_proxy.rb,
lib/db_charmer/connection_switch.rb,
lib/db_charmer/connection_factory.rb,
lib/db_charmer/multi_db_migrations.rb,
lib/db_charmer/active_record_extensions.rb,
lib/db_charmer/action_controller_extensions.rb
Defined Under Namespace
Modules: ActionControllerExtensions, ActiveRecordExtensions, AssociationProxy, ConnectionSwitch, DbMagic, FinderOverrides, MultiDbMigrations, MultiDbProxy
Classes: ConnectionFactory, ConnectionProxy
Constant Summary
collapse
- @@migration_connections_should_exist =
Rails.env.production?
- @@connections_should_exist =
Rails.env.production?
- @@switch_connections =
true
Class Method Summary
collapse
Class Method Details
.connections_should_exist? ⇒ Boolean
14
15
16
|
# File 'lib/db_charmer.rb', line 14
def self.connections_should_exist?
!! connections_should_exist
end
|
.logger ⇒ Object
25
26
27
28
|
# File 'lib/db_charmer.rb', line 25
def self.logger
return Rails.logger if defined?(Rails)
@logger ||= Logger.new(STDERR)
end
|
.migration_connections_should_exist? ⇒ Boolean
7
8
9
|
# File 'lib/db_charmer.rb', line 7
def self.migration_connections_should_exist?
!! migration_connections_should_exist
end
|
.switch_connections? ⇒ Boolean
21
22
23
|
# File 'lib/db_charmer.rb', line 21
def self.switch_connections?
!! switch_connections
end
|