From 04f0d348eb24ffc5745bb6ff3927c360d4b95278 Mon Sep 17 00:00:00 2001 From: Artem Skrynnyk Date: Wed, 28 Aug 2024 18:35:31 +0300 Subject: [PATCH] [StandardError] Add readonly flag to fetch_reified_items method --- lib/active_snapshot/models/snapshot_item.rb | 2 +- test/models/snapshot_item_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/active_snapshot/models/snapshot_item.rb b/lib/active_snapshot/models/snapshot_item.rb index 435d1b2..6215673 100644 --- a/lib/active_snapshot/models/snapshot_item.rb +++ b/lib/active_snapshot/models/snapshot_item.rb @@ -26,7 +26,7 @@ def object elsif ActiveSnapshot.config.storage_method_native_json? @object = super() else - raise ArgumentError, "Unsupported storage_method: `#{ActiveSnapshot.config.storage_method}`" + raise StandardError, "Unsupported storage_method: `#{ActiveSnapshot.config.storage_method}`" end end diff --git a/test/models/snapshot_item_test.rb b/test/models/snapshot_item_test.rb index a39be05..407badf 100644 --- a/test/models/snapshot_item_test.rb +++ b/test/models/snapshot_item_test.rb @@ -33,7 +33,7 @@ def test_validations assert instance.invalid? - %i[item_id item_type snapshot_id object].each do |attr| + [:item_id, :item_type, :snapshot_id, :object].each do |attr| assert_equal ["can't be blank"], instance.errors[attr] ### presence error end