ruby链接数据库创建类

ActiveRecord::Base.establish_connection(:adapter => "mysql2", :host => "<host>", :username => "<username>", :password => "<password>", :database => "xmo", :encoding => "utf8")


class Client < ActiveRecord::Base
end

你可能感兴趣的:(Ruby)