I was wondering whether the following use case can be achieved using the papertrail gem? A Wikipedia-type of application with wiki pages that logged in users can change/edit and where:
Moderators can undo specific changes:
I understand papertrail allows to roll back to a previous version but what I’m asking here is somewhat different. That is, the ability to undo a specific edit/change. Suppose there have been three edits/versions to a record/wiki-page. Then if you want to undo edit 2, then changes from edit 1 and 3 should still remain. But if you would roll back to the version before edit 2, then also edit 3 would be undone, which is not what I want here.Changes made (contributions) by a user feed back into the user’s profile, which would then have an overview of the changes/contributions made by that user:
I believe this is possible using the--with-changes
option (which registers the change that was made in addition to the full dump of the changed resource) in combination with the fact that papertrail registers the user who has made a change. Am I correct in my understanding?
In the tutorial http://samurails.com/gems/papertrail/ I read about using papertrail in combination with the gemdiffy
to establish what was changed exactly, but what I don’t understand is why the tutorial usesdiffy
when papertrail itself already offers a “diffing” functionality?To have moderators first accept a change by some users, before that change is actually implemented (i.e., before the change is actually applied):
Can papertrail also help to achieve this functionality?
git revert
,git diff
, andgit log
. Did you consider using git for persistence? See e.g. thegit
gem (rubygems.org/gems/git/versions/1.2.9.1) – Sociolinguisticsgit
would be great for reverting, but I'm not sure how you'd implement moderator approval. So, @huanson's suggestion of a custom implementation is probably best. – Sociolinguistics