Created
January 17, 2009 20:57
-
-
Save lifo/48452 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User < ActiveRecord::Base | |
# establish_connection :main_database | |
end | |
class Book < ActiveRecord::Base | |
establish_connection :second_database | |
end | |
ActiveRecord::Base.with_connection do | |
Book.do_some_shit! | |
User.do_more_shit! | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment