Master and slave issue


#1

hi all.
i have a model called “Comment”:
#---------------------------------------------------------
class Comment < ActiveRecord::Base

def read

end

def write

end

end
#---------------------------------------------------------
i want “read” connect to slave server and “write” connect to master
server

any ideas?

all regards.


#2

Hello,

On Mon, Feb 13, 2006 at 10:35:29AM +0100, Joe B. wrote:

i want “read” connect to slave server and “write” connect to master
server

any ideas?
I have never used multiple database connection, but you can have a look
there: http://wiki.rubyonrails.org/rails/pages/HowtoUseMultipleDatabases

I hope it helps.


Damien MERENNE removed_email_address@domain.invalid
http://www.cosinux.org/blogs/dam/

Human cloning is outlawed because if Chuck Norris were cloned,
then it would be possible for a Chuck Norris roundhouse kick to meet
another
Chuck Norris roundhouse kick. Physicists theorize that this contact
would end the universe.