Was hoping someone could save me from having to futz around with ActiveRecord for a legacy data store. Here's the deal: My application uses MongoDB/MongoMapper as the primary data store. I need to access a legacy data store (AR/MySQL database from another rails application). I got everything mapped up but the problem is, I need to be able to dynamically change the connection settinngs of a repository to point at a different db. It's the same host, server, etc, but a different db.
For example, I have a repository called :legacy, and by default it points at the db 'legacy_production', but I need to be able to modify that connection at will to instead point at 'legacy_whatever' and have all queries against models using that repository get redirected to that database. Defining all the repositories at start up is out of the question because new databases might come online in the mean time. Could anyone offer any hints on how I would accomplish this or *if* I even can accomplish this with DataMapper? -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/datamapper?hl=en.
