- msg = object.errors.map {|k,v| "#{k.to_s.titleize} #{v}"}.join('\n') alert("#{msg}")