From 00e5010a7e9effec65b2756b0daa4759e6acb8b5 Mon Sep 17 00:00:00 2001 From: Anton Katunin Date: Wed, 21 Aug 2024 20:13:27 +1000 Subject: [PATCH] Add comment --- lib/active_interaction/extras/model_fields.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/active_interaction/extras/model_fields.rb b/lib/active_interaction/extras/model_fields.rb index a47e8a3..a7023dd 100644 --- a/lib/active_interaction/extras/model_fields.rb +++ b/lib/active_interaction/extras/model_fields.rb @@ -87,6 +87,8 @@ def any_changed?(*fields) if model.respond_to?(:new_record?) && model.new_record? true elsif inputs.given?(field) + # NOTE: this causes bug when form attribute was manually changed, but `inputs.given?` is false + # change won't be detected model.send(field) != send(field) else false