Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support alt paper_trail versions assoc name
When using PaperTrail as an auditing gem, you can specify an alternative versions association by defining the `versions` hash in the `has_paper_trail` call. Initialization of PaperTrail (per model) stores the name of the association (since paper-trail-gem/paper_trail@3032b53, 23rd of July 2011) in `versions_association_name`. Using this method we can retrieve the history of a model when it uses a different name for the versions association. For example, using the following configuration won't break the auditing_adapter with this change: ```ruby has_paper_trail( version: :paper_trail_version, versions: { name: :paper_trail_versions, }, ) ```
- Loading branch information