王筝的博客
ruby学习

比如在databases.yml里配置了一个cms_production,

# -*- encoding : utf-8 -*-
class CmsAaat < ActiveRecord::Base
establish_connection “cms_#{Rails.env}”.to_sym