Skip to content

Commit

Permalink
small doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
izelnakri committed Jul 25, 2016
1 parent cb56f40 commit 46a8032
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# How does it work?

PaperTrail saves your every database row change in a seperate table called 'versions'. Library generates a new version record with associated data every time you run PaperTrail.insert/1, PaperTrail.update/1 or PaperTrail.destroy/1 functions. Simply these functions wrap your insert, update or destroy actions in a database transaction, so if your database action fails you won't get a new version.
PaperTrail can record every change in your database in a seperate database table called 'versions'. Library generates a new version record with associated data every time you run PaperTrail.insert/1, PaperTrail.update/1 or PaperTrail.destroy/1 functions. Simply these functions wrap your Repo insert, update or destroy actions in a database transaction, so if your database action fails you won't get a new version.

PaperTrail is inspired by the ruby gem ```paper_trail```. However, unlike the ```paper_trail``` gem this library actually results in less data duplication, faster and more explicit programming model to version your record changes. PaperTrail doesn't need any declaration in your model to work, it simply replaces your Repo.insert, update and destroy functions with PaperTrail ones every time you need versioning. You can you it in your phoenix controller methods for example like this:

Expand Down

0 comments on commit 46a8032

Please sign in to comment.