lib/tasks/db.rake in wcc-base-0.2.2 vs lib/tasks/db.rake in wcc-base-0.3.0
- old
+ new
@@ -23,10 +23,12 @@
def self.db_config_file_data
if defined?(ActiveRecord::Base) && ActiveRecord::Base.configurations.present?
ActiveRecord::Base.configurations
else
- @yaml_file ||= YAML.load_file("config/database.yml")
+ @yaml_file ||= YAML.load(
+ ERB.new(File.read("#{app_dir}/config/database.yml" )).result
+ )
end
rescue SystemCallError
{}
end