rails:398
From: ABE Masahiro <abe@c...>
Date: Sun, 02 Oct 2005 09:03:04 +0900
Subject: [rails:398] Re: ActiveRecordで複数のデータベースに接続する方法
あべです。 自分なら class AlterRecord < ActiveRecord:Base; end AlterRecord.establish_connection(:database => "alter", ...) # このクラスの定義はこれだけ class Foo < ActiveRecord::Base; end # デフォルトDBのfoos class Bar < AlterRecord; end; # alterのbars class Baz < AlterRecord; end; # alterのbazes : とします。 -- ABE Masahiro <abe@c...> -- ML: rails@r... 使い方: http://QuickML.com/ Web Site: http://wiki.fdiary.net/rails/ ML Archives: http://www.fdiary.net/ml/rails/
395 2005-10-02 00:56 [hage@p... ] ActiveRecordで複数のデータベースに接続する方法 396 2005-10-02 01:32 ┣[drawn.boy@g... ] 397 2005-10-02 01:42 ┃┗[drawn.boy@g... ] -> 398 2005-10-02 02:03 ┣[abe@c... ] 399 2005-10-02 02:05 ┃┗[abe@c... ] 400 2005-10-02 03:24 ┃ ┗[drawn.boy@g... ] 402 2005-10-02 18:18 ┃ ┗[hage@p... ] 401 2005-10-02 06:29 ┗[yu1@t... ] 403 2005-10-02 18:25 ┗[hage@p... ]