Active Delegate plugin

Plugin details

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

Websitehttp://www.robbyonrails.com/articles/2007/10/05/multiple-database-connections-in-ruby-on-rails Repositoryhttp://svn.planetargon.org/rails/plugins/active_delegate/ Tags Multiple Databases, ActiveRecord LicenseUnknown

Documentation

Install the plugin:
ruby script/plugin install http://svn.planetargon.org/rails/plugins/active_delegate/

Specify which connection in database.yml that this

class MasterDatabase < ActiveRecord::Base    
	handles_connection_for :master_database
end



Specify which methods need to be delegated to a different connection

class Animal < ActiveRecord::Base
	delegates_connection_to :master_database, :on => [:create, :save, :destroy]
end

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: scott, 10 months ago