如何在database.yml中将custom指令设置为默认指令

时间:2011-10-11 08:06:40

标签: database ruby-on-rails-3

我想在我的rails应用程序中将report指令设置为默认指令

development:
  adapter: mysql
  database: osvdb
  host: localhost
  username: root
  password: jeet
report:
  adapter: mysql
  database: report_db
  host: localhost
  username: root 
  password: jeet

1 个答案:

答案 0 :(得分:0)

report: &defaults
  adapter: mysql
  database: osvdb
  host: localhost
  username: root
  password: jeet

development:
  <<: *defaults