Open bandogora opened 3 years ago
I dunno, this has the feeling of something that's going to be a big pain to unravel. And, practically speaking, no one has ever destroyed a roster in "real life".
- Don't bother allowing "undo" of roster deletion?
Yeah, that works too. I don't think it would be too hard to unravel. But I agree, adding a confirm to the "Destroy" button is probably good enough for rosters.
When you click the "undo" link after destroying a Roster the Roster is recreated from it's last version, but it's associations are not. Memberships are destroyed when their Roster is: https://github.com/umts/screaming-dinosaur/blob/da4a878d10f7dfb518acb8303e39d33c96ddfd43/app/models/roster.rb#L6
This means we loose the Membership that defines what User is an admin for that Roster. With no admin, no User is allowed to edit or destroy that Roster.
I see two possible ways of fixing this:
Roster
, this would require changing the association between Users and Rosters and probably removing the Membership class.