artha42 / mm-versionable Goto Github PK
View Code? Open in Web Editor NEWAdd versioning support to MongoMapper Documents
Home Page: http://github.com/artha42/mm-versionable
License: MIT License
Add versioning support to MongoMapper Documents
Home Page: http://github.com/artha42/mm-versionable
License: MIT License
Hi there, could you release an updated gem please? I'm linking to my git repo right now and the warnings with the current gem might throw off one or the other new user.
In the documentation you say that if an "updater_id" option is passed with calls to the save method, it will be stored along with the version. I've been attempting to implement this in my controllers such that the user making the change is always saved with the version data. This is simple for my create methods, because I can just add the user option along with the call to save. For update it's slightly more difficult however as updates make a call to update_attributes.
As a temporary hack, I have changed the @object.update_attributes
section of my controllers to:
(@object.attributes = params[:object] and @object.save :updater_id => current_user)
Would overriding update_attributes as you have overridden save be an option? Or is there a better solution that you see?
Would it be possible to add version removal? I'm going back and forth between versions in my model and doing so is messy because new versions will be put on top of rolled back versions so I basically have to keep track on valid and invalid versions of my model.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.