From d6668e24ca78e27e64ace5a73c6907888cfe3d34 Mon Sep 17 00:00:00 2001 From: Weston Ganger Date: Wed, 21 Oct 2020 20:43:34 -0700 Subject: [PATCH] v2.1.1 --- CHANGELOG.md | 17 +++++++++++------ lib/paper_trail_association_tracking/version.rb | 2 +- spec/dummy_app/app/models/document.rb | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68b1350..3c321fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,18 +1,23 @@ # CHANGELOG -## Unreleased +### Unreleased - [View Diff](https://github.com/westonganger/paper_trail-association_tracking/compare/v2.1.1...master) + +- Nothing yet + +### 2.1.1 - 2020-10-21 - [View Diff](https://github.com/westonganger/paper_trail-association_tracking/compare/v2.1.0...v2.1.1) - Bug fix for reify on `has_many :through` relationships when `:source` is specified - Bug fix for reify on `has_many :through` relationships where the association is a has_one on the through model +- Bug fix to ensure install generator will set `PaperTrail.association_tracking = true` -## 2.1.0 - 2020-08-14 +### 2.1.0 - 2020-08-14 - [View Diff](https://github.com/westonganger/paper_trail-association_tracking/compare/v2.0.0...v2.1.0) - [PR #18](https://github.com/westonganger/paper_trail-association_tracking/pull/18) - Improve performance for `Model.reify(has_many: true)` by separating the SQL subquery. - [PR #15](https://github.com/westonganger/paper_trail-association_tracking/pull/15) - Recreate `version_associations.foreign_key` index to utilize the new `version_associations.foreign_type` column - Update test matrix to support multiple versions of PT-core and ActiveRecord - Remove deprecated methods `clear_transaction_id`, `transaction_id` and `transaction_id=` -## 2.0.0 - 2019-01-22 +### 2.0.0 - 2019-01-22 - [View Diff](https://github.com/westonganger/paper_trail-association_tracking/compare/v1.1.1...v2.0.0) - [PR #11](https://github.com/westonganger/paper_trail-association_tracking/issues/11) - Remove null constraint on `version_associations.foreign_type` column which was added in `v1.1.0`. This fixes issues adding the column to existing projects who are upgrading. - Add generator `rails g paper_trail_association_tracking:add_foreign_type_to_version_associations` for `versions_associations.foreign_type` column for upgrading applications from `v1.0.0` or earlier. @@ -21,16 +26,16 @@ - Run `rails g paper_trail_association_tracking:add_foreign_type_to_version_associations` and then migrate your database. -## 1.1.1 - 2018-01-14 +### 1.1.1 - 2018-01-14 - [View Diff](https://github.com/westonganger/paper_trail-association_tracking/compare/v1.1.0...v1.1.1) - Same as v2 release, this is released simply to maintain a working `v1` branch since `v1.1.0` was broken -## 1.1.0 - 2018-12-28 +### 1.1.0 - 2018-12-28 - [View Diff](https://github.com/westonganger/paper_trail-association_tracking/compare/v1.0.0...v1.1.0) - Note: This release is somewhat broken, please upgrade to `v2.0.0` or stay on `v1.0.0` - [PR #10](https://github.com/westonganger/paper_trail-association_tracking/pull/10) - The `has_many: true` option now reifies polymorphic associations. Previously they were skipped. - [PR #9](https://github.com/westonganger/paper_trail-association_tracking/pull/9) - The `belongs_to: true` option now reifies polymorphic associations. Previously they were skipped. -## 1.0.0 - 2018-06-04 +### 1.0.0 - 2018-06-04 - [PT #1070](https://github.com/paper-trail-gem/paper_trail/issues/1070), [#2](https://github.com/westonganger/paper_trail-association_tracking/issues/2) - Extracted from paper_trail gem in v9.2 diff --git a/lib/paper_trail_association_tracking/version.rb b/lib/paper_trail_association_tracking/version.rb index e6c019c..3e722bf 100644 --- a/lib/paper_trail_association_tracking/version.rb +++ b/lib/paper_trail_association_tracking/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module PaperTrailAssociationTracking - VERSION = "2.1.0" + VERSION = "2.1.1".freeze end diff --git a/spec/dummy_app/app/models/document.rb b/spec/dummy_app/app/models/document.rb index cfe01c2..869d893 100644 --- a/spec/dummy_app/app/models/document.rb +++ b/spec/dummy_app/app/models/document.rb @@ -4,7 +4,7 @@ # being named `versions`, it will be named `paper_trail_versions`. class Document < ActiveRecord::Base has_paper_trail( - versions: {name: :paper_trail_versions}, + versions: :paper_trail_versions, on: %i[create update] ) end