📜  rails 更改数据库连接 - Ruby 代码示例

📅  最后修改于: 2022-03-11 15:04:49.799000             🧑  作者: Mango

代码示例1
ActiveRecord::Base.establish_connection({:adapter => "mysql", :database => new_name, :host => "olddev",
    :username => "root", :password => "password" })