OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/packaging/conf/000-establish-connection.rb

5 lines
309 B

# Force the usage of config/database.yml instead of DATABASE_URL.
# Used so that query parameters from the DATABASE_URL are correctly used (e.g. SSL settings).
config = YAML.load(ERB.new(File.read(Rails.root.join("config/database.yml"))).result)[Rails.env.to_s]
ActiveRecord::Base.establish_connection config