Sha256: 7742eeec1eade47f76ef54206cb6979a866060a28dd72f6b2b819bed429484f4
Contents?: true
Size: 671 Bytes
Versions: 8
Compression:
Stored size: 671 Bytes
Contents
require 'active_record' module SecondBase CONNECTION_PREFIX = 'secondbase' require 'secondbase/railtie' if Rails::VERSION::MAJOR == 3 require 'secondbase/rake_method_chain' def self.do "You have just gotten to SecondBase, my friend." end def self.has_runner(env) ActiveRecord::Base.establish_connection(SecondBase::config(env)) end def self.config(env) ActiveRecord::Base.configurations[SecondBase::CONNECTION_PREFIX][env] end end module FirstBase def self.config(env) ActiveRecord::Base.configurations[env] end def self.has_runner(env) ActiveRecord::Base.establish_connection(FirstBase::config(env)) end end
Version data entries
8 entries across 8 versions & 1 rubygems