Skip to content

Commit

Permalink
Fix bug with plain objects
Browse files Browse the repository at this point in the history
  • Loading branch information
antulik committed Aug 9, 2024
1 parent bd85d05 commit c95505d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/active_interaction/extras/model_fields.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def any_changed?(*fields)
model_field = self.class.model_field_cache_inverse[field]
if model_field
model = send(model_field)
if model.new_record?
if model.respond_to?(:new_record?) && model.new_record?
true
elsif inputs.given?(field)
model.send(field) != send(field)
Expand Down

0 comments on commit c95505d

Please sign in to comment.