There must be space between { |key| as per ruby style guide lines there is one after key in the end.