Merge pull request #10482 from anansilva/10044-fix-activemodel-errors-deprecation-warning

Fix deprecation warning when accessing model errors
This commit is contained in:
jibees
2023-02-27 17:29:33 +01:00
committed by GitHub

View File

@@ -415,8 +415,8 @@ module Spree
# If the master cannot be saved, the Product object will get its errors
# and will be destroyed
rescue ActiveRecord::RecordInvalid
master.errors.each do |att, error|
errors.add(att, error)
master.errors.each do |error|
errors.add error.attribute, error.message
end
raise
end