Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- config.before_configuration do
- ['env.local.yml', 'env.yml'].each do |file_variation|
- env_file = File.join(Rails.root, 'config', file_variation)
- YAML.load(File.open(env_file)).each do |key, value|
- ENV[key.to_s] = value unless ENV[key.to_s].present?
- end if File.exists?(env_file) && YAML.load(File.open(env_file))
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement