projecthydra/active_fedora — pull request #47 by dchandekstark (2013-02-25 19:03:13+00:00)
Title: Audit trail

Provides ActiveFedora::Auditable mixin for access to Fedora audit trail information. The mixin provides one public instance method #audit_trail which returns an instance of a private class encapsulating the audit trail information. The #records method of the audit trail returns an array of objects with accessors representing the audit records and data points.

```ruby
obj.audit_trail.records.each do |rec|
puts rec.id
puts rec.process_type
puts rec.action
puts rec.component_id
puts rec.responsibility
puts rec.date
puts rec.justification
end
```

Note: The #date method of the private FedoraAuditRecord class return a string (i.e., unparsed from the audit trail source); should this value be parsed with DateTime.strptime() ? --DCS