diff --git a/app/heron/factories/concerns/eventful.rb b/app/heron/factories/concerns/eventful.rb index f6cfc8cae3..3d750bb2a1 100644 --- a/app/heron/factories/concerns/eventful.rb +++ b/app/heron/factories/concerns/eventful.rb @@ -23,7 +23,13 @@ def add_all_errors_from_events(events) end def add_all_errors_from_event(event) - event.errors.each { |key, value| errors.add(key, value) } + if event.errors.is_a?(ActiveModel::Errors) + event.errors.each do |error| + errors.add(error.attribute, error.message) + end + else + event.errors.each { |key, value| errors.add(key, value) } + end end def rollback_for_events(events)