You are passing a block expecting two parameters,
so the old hash behavior is simulated. As this is deprecated,
this will result in an ArgumentError in Rails 7.0.
(called from map at /Users/santiagoalvarezvargas/Documents/Documents - Santiago’s Mac mini/GitHub/restructure/app/controllers/concerns/master_handler.rb:313)
assigns a newly created but unsaved item as @var
DEPRECATION WARNING: Enumerating ActiveModel::Errors as a hash has been deprecated.
In Rails 6.1, `errors` is an array of Error objects,
therefore it should be accessed by a block with a single block
parameter like this:
person.errors.each do |error|
attribute = error.attribute
message = error.message
end