It is usual to use one connection per model, but you can force a different connection at the method level. it shouldn't take too much work to pass a user to a method and define the connection based on the user.
So possible.
However, not something that's going to work without you putting in the effort to work out the way to handle the each connection. As this goes against the usual Rails conventions it will require you to work out a lot of it yourself.
Yes again, but you'll have to manually create the code to do it.
The key thing is that anything that is available to Ruby is available to you in Rails. Therefore, if you want to set up customised connections its available but you'll need to write the Ruby classes to handle it - either directly or to proxy the connections via ActiveRecord or another Ruby database utility. If you use JRuby, you may even be able to use JDBC.
With Rails, doing things the "Rails way" is the easiest path, but not the only path.
Depends how many users. Less than five : not a problem. Fifty, and as you say "an administrative nightmare".
The key point is that you can do it using the tools Rails provides. As with any coding language, the tools are there for you to build heaven or hell. The skill of the developer is in not building one when they meant to build the other.
Bookmarks