ActiveRecord, Mysql Views, and You.

Posted by Phantom Mongoose Thu, 07 Feb 2008 09:19:00 GMT

It’s no secret that with Ruby on Rails you can change the database connection an individual model uses.

Why would you want to do this? As on example say that you have two applications that you want to use a single sign-on. You could set your user model for one of the applications to point at the other applications database. This way both applications are using the same set of users, but all of their other tables are separated into their individual databases.

This works for simple cases, but in more complex cases, it may get difficult to manage. And I don’t think Rails will be able to optimize more complex queries due to the different models having different connections.

So what’s a better way to handle more complex situations?

Railsconf was pretty sweet ...

Posted by Phantom Mongoose Thu, 24 May 2007 12:21:00 GMT

... and I learned a lot.

I believe I have already forgotten more than I’ve retained. A lot of genuinely interesting information locked in a life-and-death struggle to be crystallized with what meager neurons are available to do any meaningful processing.