diff --git a/lib/paper_trail/has_paper_trail.rb b/lib/paper_trail/has_paper_trail.rb index c964bdc9..7e93a910 100644 --- a/lib/paper_trail/has_paper_trail.rb +++ b/lib/paper_trail/has_paper_trail.rb @@ -294,7 +294,7 @@ module PaperTrail def changes_for_paper_trail self.changes.delete_if do |key, value| !notably_changed.include?(key) - end.tap { |changes| self.class.serialize_attribute_changes(changes) }.to_h + end.tap { |changes| self.class.serialize_attribute_changes(changes) }.to_hash end # Invoked via`after_update` callback for when a previous version is reified and then saved diff --git a/spec/models/version_spec.rb b/spec/models/version_spec.rb index 411c5163..1cd48321 100644 --- a/spec/models/version_spec.rb +++ b/spec/models/version_spec.rb @@ -21,7 +21,7 @@ describe PaperTrail::Version, :type => :model do specify { expect(PaperTrail.serializer).to be PaperTrail::Serializers::YAML } it "should store out as a plain hash" do - expect(value =~ /ActiveSupport::HashWithIndifferentAccess/).to be_nil + expect(value =~ /HashWithIndifferentAccess/).to be_nil end end @@ -29,7 +29,7 @@ describe PaperTrail::Version, :type => :model do before(:all) { PaperTrail.serializer = PaperTrail::Serializers::JSON } it "should store out as a plain hash" do - expect(value =~ /ActiveSupport::HashWithIndifferentAccess/).to be_nil + expect(value =~ /HashWithIndifferentAccess/).to be_nil end after(:all) { PaperTrail.serializer = PaperTrail::Serializers::YAML }