undefined local variable or method `key' for #<Category:0x00562728898230>