paper_trail v0.6.1 PaperTrail

Summary

Functions

Deletes a record from the database with a related version insertion in one transaction

Gets the current record of a version

Gets the last version of a record

Gets the last version of a record given its module reference and its id

Gets all the versions of a record

Gets all the versions of a record given a module and its id

Inserts a record to the database with a related version insertion in one transaction

Updates a record from the database with a related version insertion in one transaction

Functions

delete(struct, options \\ [origin: nil, meta: nil, originator_id: nil])

Deletes a record from the database with a related version insertion in one transaction

get_current(version)

Gets the current record of a version

get_version(record)

Gets the last version of a record

get_version(model, id)

Gets the last version of a record given its module reference and its id

get_versions(record)

Gets all the versions of a record

get_versions(model, id)

Gets all the versions of a record given a module and its id

insert(changeset, options \\ [origin: nil, meta: nil, originator_id: nil])

Inserts a record to the database with a related version insertion in one transaction

update(changeset, options \\ [origin: nil, meta: nil, originator_id: nil])

Updates a record from the database with a related version insertion in one transaction