@Colin and @Mike, thank you both, particularly, mike , for the part about 
devise integration. To wrap up, I would like your opinion whether there any 
flaws or major disadvantages to my structure.

I dropped the organizations table since I think its redundant. This leaves 
me with the following tables: users, relationships, blogs, 
relationship_types.

User has_many blogs through relationships

Blog has_many subscribers through relationships
        has_many editors/admins through relationships

relationships will have user_id, blog_id, and relationship_type_id

relationshiptypes will have admin, editor, and subscriber.

I'm unsure about the last part: the relationship type id column. It would 
allow a User object to Admin, edit, and subscriber to many blogs. I'm not 
sure it it's a good approach.

I'm further unsure whether to restrict the relationships table to one row 
per blog and user (thus ignoring the relationship type id col; so blog 1 
and user 1 can have only 1 row in the relationships table; relationships 
can be upgraded and downgraded). This means permissions must be inherited 
from lower to higher roles, so it may not be flexible.

Any thoughts on this approach? Could it be done better? Just looking for 
thoughts... thanks!

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/NqIbhIkwO7kJ.
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/rubyonrails-talk?hl=en.

Reply via email to