Code Monkey home page Code Monkey logo

Comments (3)

heydonovan avatar heydonovan commented on June 14, 2024

Have you checked out the paper_trail or audited gem?

from notebook.

drusepth avatar drusepth commented on June 14, 2024

Implementation:

  • Whenever a Universe, Character, Location, Item, Creature, Race, Religion, Group, Magic, Language, or Scene is created or edited, a ContentChangeEvent should be created with the following properties:
    • user_id - ID of the user making the change
    • changed_fields - hash of field changes (e.g. old and new values), probably best to grab from dirty_fields during the save hook
    • created_at - automatically set, self explanatory
    • action - create, edit, or delete
    • content_id - the ID of the associated content, e.g. 5 or 8185
    • content_type - the content type, e.g. :character, :location, :race, etc

When visiting a content's page in the notebook, there should be an additional pane tab for "Changelog" (similar to the Gallery setup, which needs refactored eventually with a new design). Opening this pane should show a timeline consisting of:

  • The date/time this piece of content was created, and by which user (user_id on the content itself)
  • Any ContentChangeEvents associated with this content with a diff view of which fields changed and what their old and new values were (probably need some cleanup here later, but lets just show it all for now)

Whenever a non-Universe piece of content is deleted, we should create a ContentChangeEvent for its universe (if any) that says that content and content type was deleted (e.g. "Character Bob was deleted by Alice") for display on the universe's Changelog pane.

from notebook.

drusepth avatar drusepth commented on June 14, 2024

This is done and live. Improvements should have separate issues. 👍

from notebook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.