Commit 0152d128 authored by Igor Drozdov's avatar Igor Drozdov

Use errors.add to modify the error messages

parent fabc202a
......@@ -46,7 +46,10 @@ module ReleaseHighlights
def add_line_numbers_to_errors!
errors.messages.each do |attribute, messages|
messages.map! { |m| "#{m} (line #{line_number_for(attribute)})" }
extended_messages = messages.map { |m| "#{m} (line #{line_number_for(attribute)})" }
errors.delete(attribute)
extended_messages.each { |extended_message| errors.add(attribute, extended_message) }
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment