Module: MyStuff::MultiDB::CoreExt::Base
- Defined in:
- lib/my_stuff/multidb/core_ext/base.rb
Overview
Mixin for subclasses of ActiveRecord::Base.
This deals with routing connections via the ‘magic’ ActiveRecord::Base subclass for the appropriate database.
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
-
#connection ⇒ Object
:nodoc:.
Class Method Details
.included(klass) ⇒ Object
15 16 17 |
# File 'lib/my_stuff/multidb/core_ext/base.rb', line 15 def self.included(klass) klass.extend(ClassMethods) end |
Instance Method Details
#connection ⇒ Object
:nodoc:
11 12 13 |
# File 'lib/my_stuff/multidb/core_ext/base.rb', line 11 def connection self.class.connection end |