Skip to content

Commit

Permalink
Explicitly make PaperTrail::Version item relationship optional (fixes p…
Browse files Browse the repository at this point in the history
  • Loading branch information
owenr committed Dec 31, 2015
1 parent eef918b commit ebbbd3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ None

### Fixed

None
- [#682](https://github.com/airblade/paper_trail/issues/682) -
Explicitly make PaperTrail::Version item relationship optional (to allow after_destroy versioning)

## 4.1.0 (Unreleased)

Expand Down
2 changes: 1 addition & 1 deletion lib/paper_trail/version_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module VersionConcern
extend ::ActiveSupport::Concern

included do
belongs_to :item, :polymorphic => true
belongs_to :item, :polymorphic => true, :required => false

# Since the test suite has test coverage for this, we want to declare
# the association when the test suite is running. This makes it pass when
Expand Down

0 comments on commit ebbbd3d

Please sign in to comment.