lib/alba/key_transformer.rb in alba-1.0.0 vs lib/alba/key_transformer.rb in alba-1.0.1

- old
+ new

@@ -14,9 +14,10 @@ # @params key [String] key to be transformed # @params transform_type [Symbol] transform type # @return [String] transformed key # @raise [Alba::Error] when transform_type is not supported def transform(key, transform_type) + key = key.to_s case transform_type when :camel ActiveSupport::Inflector.camelize(key) when :lower_camel ActiveSupport::Inflector.camelize(key, false)