-
-
Notifications
You must be signed in to change notification settings - Fork 974
The Owner Problem
qrush edited this page Aug 7, 2010
·
6 revisions
Managing owners for gems sucks right now. Let’s fix it. One important note to remember here: the solution should be extensible for subdomains as well.
Just a simple has_many through system:
class User < ActiveRecord::Base has_many :ownerships has_many :rubygems, :through => :ownerships end class Ownership < ActiveRecord::Base belongs_to :user belongs_to :rubygem end class Rubygem < ActiveRecord::Base has_many :owners, :through => :ownerships, :source => :user has_many :ownerships end
Create a Group model that has_many Users. Essentially acts as an ACL. Possibly promote one user as a “Manager” or “Admin” of the list. Users can then create arbitrary groups for each Rubygem or Subdomain.
Feel free to add your thoughts/idea here (or above) —@qrush