public
Description: Master/Slave delegation for ActiveRecord models for reads/writes
Homepage:
Clone URL: git://github.com/robbyrussell/active_delegate.git
name age message
file LICENSE Sun Mar 02 18:26:13 -0800 2008 Changing the year in the LICENSE [Robby Russell]
file README Sun Mar 02 18:26:47 -0800 2008 Adding documentaiton to the README file [Robby Russell]
file init.rb Fri Oct 05 15:41:57 -0700 2007 Adding active_delegate 0.1 to the .org reposito... [robby]
directory lib/ Fri Oct 05 15:41:57 -0700 2007 Adding active_delegate 0.1 to the .org reposito... [robby]
README
ActiveDelegate
==============

Provides ActiveRecord with the ability to talk to multiple databases from a single model.

# app/models/master_database.rb
class MasterDatabase < ActiveRecord::Base
  handles_connection_for :master_database # <-- this matches the key from our database.yml
end

# app/models/animal.rb
class Animal < ActiveRecord::Base
  delegates_connection_to :master_database, :on => [:create, :save, :destroy]
end

TODO: Add more documentation