Skip to content

Commit

Permalink
small documentation changes
Browse files Browse the repository at this point in the history
  • Loading branch information
izelnakri committed Oct 14, 2016
1 parent 44e18ad commit 1af92b9
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# How does it work?

PaperTrail lets you 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 lets you 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.delete/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.

## Example

Expand Down Expand Up @@ -132,9 +132,9 @@ TODO AREA:

give originator example

Your versions don't need a model lifecycle callbacks like before_create or before_update for any extra meta data, all your meta data could be stored in one object and that object could be passed as the second optional parameter to PaperTrail.create
Your versions don't need a model lifecycle callbacks like before_create or before_update for any extra meta data, all your meta data could be stored in one object and that object could be passed as the second optional parameter to PaperTrail.insert || PaperTrail.update || PaperTrail.delete

## Suggestions

PaperTrail.Version(s) order matter,
don't delete your versions merge them
- PaperTrail.Version(s) order matter,
- don't delete your versions merge them
2 changes: 2 additions & 0 deletions doc/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<title>404 – paper_trail v0.1.6</title>
<link rel="stylesheet" href="dist/app-88251e7c81.css" />

<link rel="canonical" href="https://hexdocs.pm/paper_trail/404.html" />

<script src="dist/sidebar_items.js"></script>
</head>
<body data-type="extras">
Expand Down
2 changes: 2 additions & 0 deletions doc/Mix.Tasks.Papertrail.Install.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<title>Mix.Tasks.Papertrail.Install – paper_trail v0.1.6</title>
<link rel="stylesheet" href="dist/app-88251e7c81.css" />

<link rel="canonical" href="https://hexdocs.pm/paper_trail/Mix.Tasks.Papertrail.Install.html" />

<script src="dist/sidebar_items.js"></script>
</head>
<body data-type="modules">
Expand Down
2 changes: 2 additions & 0 deletions doc/PaperTrail.Migration.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<title>PaperTrail.Migration – paper_trail v0.1.6</title>
<link rel="stylesheet" href="dist/app-88251e7c81.css" />

<link rel="canonical" href="https://hexdocs.pm/paper_trail/PaperTrail.Migration.html" />

<script src="dist/sidebar_items.js"></script>
</head>
<body data-type="modules">
Expand Down
2 changes: 2 additions & 0 deletions doc/PaperTrail.Version.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<title>PaperTrail.Version – paper_trail v0.1.6</title>
<link rel="stylesheet" href="dist/app-88251e7c81.css" />

<link rel="canonical" href="https://hexdocs.pm/paper_trail/PaperTrail.Version.html" />

<script src="dist/sidebar_items.js"></script>
</head>
<body data-type="modules">
Expand Down
2 changes: 2 additions & 0 deletions doc/PaperTrail.VersionQueries.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<title>PaperTrail.VersionQueries – paper_trail v0.1.6</title>
<link rel="stylesheet" href="dist/app-88251e7c81.css" />

<link rel="canonical" href="https://hexdocs.pm/paper_trail/PaperTrail.VersionQueries.html" />

<script src="dist/sidebar_items.js"></script>
</head>
<body data-type="modules">
Expand Down
2 changes: 2 additions & 0 deletions doc/PaperTrail.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<title>PaperTrail – paper_trail v0.1.6</title>
<link rel="stylesheet" href="dist/app-88251e7c81.css" />

<link rel="canonical" href="https://hexdocs.pm/paper_trail/PaperTrail.html" />

<script src="dist/sidebar_items.js"></script>
</head>
<body data-type="modules">
Expand Down
2 changes: 2 additions & 0 deletions doc/api-reference.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<title>API Reference – paper_trail v0.1.6</title>
<link rel="stylesheet" href="dist/app-88251e7c81.css" />

<link rel="canonical" href="https://hexdocs.pm/paper_trail/api-reference.html" />

<script src="dist/sidebar_items.js"></script>
</head>
<body data-type="extras">
Expand Down

0 comments on commit 1af92b9

Please sign in to comment.