mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-15 23:57:48 +00:00
Merge pull request #10482 from anansilva/10044-fix-activemodel-errors-deprecation-warning
Fix deprecation warning when accessing model errors
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user