lib/contentful/management/support.rb in contentful-management-1.6.0 vs lib/contentful/management/support.rb in contentful-management-1.7.0
- old
+ new
@@ -3,10 +3,10 @@
# Utility methods used by the contentful management gem
module Support
class << self
# Transforms CamelCase into snake_case (taken from zucker)
def snakify(object)
- snake = String(object).gsub(/(?<!^)[A-Z]/) { "_#$&" }
+ snake = String(object).gsub(/(?<!^)[A-Z]/) { "_#{$&}" }
snake.downcase
end
# Merges two hashes with recursion
def deep_hash_merge(query_hash, attribute_hash)