ruby on rails - How to setup admin approval a model's edits -


i need system regular user can edit model edits don't happen until approved administrator. found gem called paper_trail had model versioning doesn't support want do. i'm wondering how other people have handled problem. should add there associations able user edit @ same time. aren't complicated, example 1 aliases.

the more complicated part maybe case multiple users edit same model , trying sort of merge.

one approach versioning version approval.

every edit creates new version of model object , associations. @ 1 time there 1 "current" version of model object (and it's representation in database).

if 2 users submit 2 separate edits, these create 2 "pending" versions.

an admin approve edits moving current version new "pending" version. merges accomplished well, domain specific, , result in conflicts, keeping separate versions smart anyways.

there few ways accomplish this, , best depend on dynamics of situation.

i'd recommend looking @ how git works , trying model system after that. sort of pointer head model object revision history , ability move head different revisions. merging work similar git.

hope helps.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -