Topic: Strategy for logging into a multi-project database?

I've created a graphic describing how I might maintain many distinct projects inside a single database. Each project's data is separate and distinct and shares a common monolithic database. There's got to be someone out there doing something like this, as it might be similar to the way DNN did his Basecamp. Is there a 'plugin' or code somewhere that's already attempting this feat?
Thank you,
David
http://www.inventorytrackers.com/files/rails_frontend.tif

Re: Strategy for logging into a multi-project database?

I don't know of any plugin out there that does this. Even if it did it probably wouldn't fit exactly with your requirements.

But, it looks like you're getting there. I'm still not sure if you need to distinguish managers from users. You could just have a boolean field or STI in the Users table to make certain users managers which gives them different permissions/access. If you don't need Manger than it's as simple as this:

class User < ActiveRecord::Base
  has_many :permissions
  has_many :projects, :through => :permissions
end

class Permission < AcctiveRecord::Base
  belongs_to :user
  belongs_to :project
end

class Project < ActiveRecord::Base
  has_many :permissions
  has_many :users, :through => :permissions
end


That seems like a pretty good design to me.

Railscasts - Free Ruby on Rails Screencasts

Re: Strategy for logging into a multi-project database?

BraveDave wrote:

I've created a graphic describing how I might maintain many distinct projects inside a single database. Each project's data is separate and distinct and shares a common monolithic database. There's got to be someone out there doing something like this, as it might be similar to the way DNN did his Basecamp. Is there a 'plugin' or code somewhere that's already attempting this feat?
Thank you,
David
http://www.inventorytrackers.com/files/ … ontend.tif

Hasn't DHH been quoted saying that Basecamp uses ONE database?  Any reason why you feel that you REALLY need this multi-database setup?