Module: UseDb::Configurations::ClassMethods
- Defined in:
- lib/use_db/configurations.rb
Instance Method Summary collapse
Instance Method Details
#configurations_with_other_dbs ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/use_db/configurations.rb', line 19 def configurations_with_other_dbs # puts "In configurations with other dbs" if configurations_without_other_dbs.empty? # for rake tasks configurations_without_other_dbs.update(YAML::load(ERB.new(IO.read( File.join( Rails.root,'config','database.yml'))).result)) end OTHER_DB_FILES.each do |f| configurations_without_other_dbs.update(YAML::load(ERB.new(IO.read(f)).result)) end if defined?(OTHER_DB_FILES) configurations_without_other_dbs end |