diff --git a/CHANGELOG.md b/CHANGELOG.md index b7900a53..a9425fe5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,7 @@ recommendations of [keepachangelog.com](http://keepachangelog.com/). ### Breaking Changes -- [#479](https://github.com/airblade/paper_trail/issues/479) - Deprecated - `originator` method, use `paper_trail_originator` +- Removed deprecated `Version#originator`, use `#paper_trail_originator` - Using paper_trail.on_destroy(:after) with ActiveRecord's belongs_to_required_by_default will produce an error instead of a warning. - Failing to set PaperTrail.config.track_associations will no longer produce diff --git a/lib/paper_trail/version_concern.rb b/lib/paper_trail/version_concern.rb index 8af914e6..c828a2f8 100644 --- a/lib/paper_trail/version_concern.rb +++ b/lib/paper_trail/version_concern.rb @@ -230,11 +230,6 @@ module PaperTrail @paper_trail_originator ||= previous.try(:whodunnit) end - def originator - ::ActiveSupport::Deprecation.warn "Use paper_trail_originator instead of originator." - paper_trail_originator - end - # Returns who changed the item from the state it had in this version. This # is an alias for `whodunnit`. def terminator diff --git a/spec/models/version_spec.rb b/spec/models/version_spec.rb index 7d6a0329..1ff8e504 100644 --- a/spec/models/version_spec.rb +++ b/spec/models/version_spec.rb @@ -65,23 +65,6 @@ module PaperTrail end end - describe "#originator" do - it "delegates to paper_trail_originator" do - allow(ActiveSupport::Deprecation).to receive(:warn) - version = PaperTrail::Version.new - allow(version).to receive(:paper_trail_originator) - version.originator - expect(version).to have_received(:paper_trail_originator) - end - - it "displays a deprecation warning" do - allow(ActiveSupport::Deprecation).to receive(:warn) - PaperTrail::Version.new.originator - expect(ActiveSupport::Deprecation).to have_received(:warn). - with(/Use paper_trail_originator instead of originator/) - end - end - describe "#terminator" do it "is an alias for the `whodunnit` attribute" do attributes = { whodunnit: FFaker::Name.first_name }