Explorar el Código

map instead of each on hash

Kylie Jo Swistak hace 5 años
padre
commit
6d4e657d90
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      app/embeds/reject.rb

+ 1 - 1
app/embeds/reject.rb

@@ -41,7 +41,7 @@ end
 
 def reject_fields(message_hash)
   fields = []
-  message_hash.each do |emoji, message|
+  message_hash.map do |emoji, message|
     fields.push({
       name: emoji,
       value: "#{message}\n#{CharApp::INLINE_SPACE}",