From 26a3820eff9ddd8b6b3f4024548aca862aec71c2 Mon Sep 17 00:00:00 2001 From: Jeff Keen Date: Tue, 27 Feb 2024 17:50:12 -0600 Subject: [PATCH] Remove default callback for assignment to keep callback order in tact for possible compatibility issues --- lib/graphiti/resource/persistence.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/graphiti/resource/persistence.rb b/lib/graphiti/resource/persistence.rb index 164c8f87..9840f413 100644 --- a/lib/graphiti/resource/persistence.rb +++ b/lib/graphiti/resource/persistence.rb @@ -4,11 +4,11 @@ module Persistence extend ActiveSupport::Concern class_methods do - def before_attributes(method = nil, only: [:create, :update, :assign], &blk) + def before_attributes(method = nil, only: [:create, :update], &blk) add_callback(:attributes, :before, method, only, &blk) end - def after_attributes(method = nil, only: [:create, :update, :assign], &blk) + def after_attributes(method = nil, only: [:create, :update], &blk) add_callback(:attributes, :after, method, only, &blk) end