0

I have a model called posts and I have users (using Devise, CanCan, and Rolify) that will have different roles for each post. User roles with respect to posts are owner, moderator, and nothing (regular user or guest).

Here's what I'd like to happen:

A user initially creates the post and then can invite others to help moderate it. The owner has all the abilities of a moderator with the added ability to invite more moderators. I need a way to handle the owner user canceling his account (soft delete) without orphaning the post and without leaving it without an owner. I'd also like a way to transfer the owner role to another user either from an admin account or by the owner themselves.

Right now I have Post belonging to User and User has_many posts, but not sure if that's the right way to start...

Any guidance about how I can implement this either through a Gem or from scratch?

l85m
  • 808
  • 1
  • 10
  • 19
  • Is soft delete of a user already done? or it is part of the question? – Jason Kim Apr 09 '13 at 17:44
  • @garbage - It's already done. I followed the fantastic advice I found [here](http://stackoverflow.com/questions/5140643/how-to-soft-delete-user-with-devise) to set it up. – l85m Apr 09 '13 at 18:42

0 Answers0