Browse Source

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

This is a partial revert of 2ebd9c61d5fef505711382f00d90a177aa46176a
Andrea Campi 12 years ago
parent
commit
f17f7e6247
1 changed files with 8 additions and 6 deletions
  1. 8 6
      templates/default/database.yml.erb

+ 8 - 6
templates/default/database.yml.erb

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