Skip to content

Commit 58056d2

Browse files
committed
git-er-done
1 parent 285e024 commit 58056d2

File tree

8 files changed

+11
-15
lines changed

8 files changed

+11
-15
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
This project follows [semver 2.0.0](http://semver.org/spec/v2.0.0.html) and the
44
recommendations of [keepachangelog.com](http://keepachangelog.com/).
55

6-
## 0.9.0 (Unreleased)
6+
## 0.9.0
77

88
- [PaperTrail #1070](https://github.com/paper-trail-gem/paper_trail/issues/1070) - Extracted from paper_trail gem before v10.0.0 was released.

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ gemspec
66

77
gem 'rails-controller-testing'
88

9-
gem 'paper_trail', git: 'https://github.com/westonganger/paper_trail.git', branch: 'remove_association_tracking'
9+
gem 'paper_trail', git: 'https://github.com/paper-trail-gem/paper_trail.git', branch: 'remove_association_tracking'

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,10 @@ Associations have the following known issues, in order of descending importance.
150150
If you notice anything here that should be updated/removed/edited feel free to create an issue.
151151

152152
1. PaperTrail-AssociationTracking only reifies the first level of associations.
153-
1. Sometimes the has_one association will find more than one possible candidate and will raise a `PaperTrail::Reifiers::HasOne::FoundMoreThanOne` error. For example, see `spec/models/person_spec.rb`
154-
- If you are not using STI, you may want to just assume the first result (of multiple) is the correct one and continue. PaperTrail <= v8 did this without error or warning. To do so add the following line to your initializer: `PaperTrail.config.association_reify_error_behaviour = :warn`. Valid options are: `[:error, :warn, :ignore]`
155-
- When using STI, even if you enable `:warn` you will likely still end up recieving an `ActiveRecord::AssociationTypeMismatch` error.
156-
1. [PT Issue #542](https://github.com/airblade/paper_trail/issues/542) -
157-
Not compatible with [transactional tests](https://github.com/rails/rails/blob/591a0bb87fff7583e01156696fbbf929d48d3e54/activerecord/lib/active_record/fixtures.rb#L142), aka. transactional fixtures.
153+
1. Sometimes the has_one association will find more than one possible candidate and will raise a `PaperTrailAssociationTracking::Reifiers::HasOne::FoundMoreThanOne` error. For example, see `spec/models/person_spec.rb`
154+
- If you are not using STI, you may want to just assume the first result (of multiple) is the correct one and continue. PaperTrail <= v8 did this without error or warning. To do so add the following line to your initializer: `PaperTrail.config.association_reify_error_behaviour = :warn`. Valid options are: `[:error, :warn, :ignore]`
155+
- When using STI, even if you enable `:warn` you will likely still end up recieving an `ActiveRecord::AssociationTypeMismatch` error.
156+
1. Not compatible with [transactional tests](https://github.com/rails/rails/blob/591a0bb87fff7583e01156696fbbf929d48d3e54/activerecord/lib/active_record/fixtures.rb#L142), aka. transactional fixtures. - [PT Issue #542](https://github.com/airblade/paper_trail/issues/542)
158157
1. Requires database timestamp columns with fractional second precision.
159158
- Sqlite and postgres timestamps have fractional second precision by default.
160159
[MySQL timestamps do not](https://dev.mysql.com/doc/refman/5.6/en/fractional-seconds.html). Furthermore, MySQL 5.5 and earlier do not
@@ -233,7 +232,7 @@ If you notice anything here that should be updated/removed/edited feel free to c
233232
234233
### Regarding ActiveRecord Single Table Inheritance (STI)
235234
236-
At this time during `reify` any STI `has_one` associations will raise a `PaperTrail::Reifiers::HasOne::FoundMoreThanOne` error. See [PT Issue #594](https://github.com/airblade/paper_trail/issues/594)
235+
At this time during `reify` any STI `has_one` associations will raise a `PaperTrailAssociationTracking::Reifiers::HasOne::FoundMoreThanOne` error. See [PT Issue #594](https://github.com/airblade/paper_trail/issues/594)
237236
238237
Something to note though, is while the PaperTrail gem supports [Single Table Inheritance](http://api.rubyonrails.org/classes/ActiveRecord/Base.html#class-ActiveRecord::Base-label-Single+table+inheritance), I do NOT recommend STI ever. Your better off rolling your own solution rather than using STI.
239238

gemfiles/ar_4.2.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
source "https://rubygems.org"
44

55
### TEMPORARY
6-
gem 'paper_trail', git: 'https://github.com/westonganger/paper_trail.git', branch: 'remove_association_tracking'
6+
gem 'paper_trail', git: 'https://github.com/paper-trail-gem/paper_trail.git', branch: 'remove_association_tracking'
77

88
gem "activerecord", "~> 4.2.10"
99
gem "database_cleaner", "~> 1.6"

gemfiles/ar_5.0.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
source "https://rubygems.org"
44

55
### TEMPORARY
6-
gem 'paper_trail', git: 'https://github.com/westonganger/paper_trail.git', branch: 'remove_association_tracking'
6+
gem 'paper_trail', git: 'https://github.com/paper-trail-gem/paper_trail.git', branch: 'remove_association_tracking'
77

88
gem "activerecord", "~> 5.0.6"
99
gem "rails-controller-testing"

gemfiles/ar_5.1.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
source "https://rubygems.org"
44

55
### TEMPORARY
6-
gem 'paper_trail', git: 'https://github.com/westonganger/paper_trail.git', branch: 'remove_association_tracking'
6+
gem 'paper_trail', git: 'https://github.com/paper-trail-gem/paper_trail.git', branch: 'remove_association_tracking'
77

88
gem "activerecord", "~> 5.1.4"
99
gem "rails-controller-testing"

gemfiles/ar_5.2.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
source "https://rubygems.org"
44

55
### TEMPORARY
6-
gem 'paper_trail', git: 'https://github.com/westonganger/paper_trail.git', branch: 'remove_association_tracking'
6+
gem 'paper_trail', git: 'https://github.com/paper-trail-gem/paper_trail.git', branch: 'remove_association_tracking'
77

88
gem "activerecord", "~> 5.2.0"
99
gem "rails-controller-testing"

paper_trail-association_tracking.gemspec

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ Gem::Specification.new do |s|
2222
s.required_rubygems_version = ">= 1.3.6"
2323
s.required_ruby_version = ">= 2.3.0"
2424

25-
ENV['PT_ASSOCIATION_TRACKING'] = 'false'
26-
s.add_dependency "paper_trail"#, ">= 10"
27-
2825
s.add_development_dependency "appraisal", "~> 2.2"
2926
s.add_development_dependency "byebug", "~> 9.1"
3027
s.add_development_dependency "ffaker", "~> 2.7"

0 commit comments

Comments
 (0)