<%= @rails_env %>:
  adapter: <%= @database['adapter'] %>
  host: <%= @host %>
  database: <%= @database['database'] %>
  username: <%= @database['username'] %>
  password: <%= @database['password'] %>
  encoding: <%= @database.has_key?('encoding') ? @database['encoding'] : 'utf8' %>
  reconnect: true

<%- @databases.each do |env, db| %>
<%= (env =~ /_default/ ? "production" : env) %>:
  adapter: <%= db['adapter'] %>
  host: <%= @host %>
  database: <%= db['database'] %>
  username: <%= db['username'] %>
  password: <%= db['password'] %>
  encoding: <%= db.has_key?('encoding') ? db['encoding'] : 'utf8' %>
  reconnect: true
<%- end %>

Revert changes to a template that is used only by the legacy recipe.
Revert changes to a template that is used only by the legacy recipe.

This is a partial revert of 2ebd9c61d5fef505711382f00d90a177aa46176a