rails-convert-hash-key-from-camelcase-to-snakecae-and-vice-versa

109 words, 1 mins

方便的转换hash key,驼峰和蛇形命名

obj.deep_transform_keys! { |key| key.camelcase }
obj.deep_transform_keys! { |key| key.snake_case }