Rails synchronize mysql tables from remote database
I have rails 2.3.11 , ruby 1.8
I have one database in my projects, but i want take emails from another database (another adress) for example i 开发者_StackOverflowhave users@users, and email in respondents@respondents.
Question: Is it possible to take emails from one database for example and paste in another?
There is a good blog post about accessing multiple databases in rails here: http://www.rubynaut.net/articles/2008/05/31/how-to-access-multiple-database-in-rails.html
Alternatively if there data in both databases isn't changing regularly you could write a rake task that read from both databases, combined the data and wrote it about out to a single database and then just work from that?
精彩评论