lib/sms_notify/response.rb in cdyne-sms-notify-0.8.0 vs lib/sms_notify/response.rb in cdyne-sms-notify-0.8.1
- old
+ new
@@ -24,10 +24,10 @@
# == Examples:
# normalize_keys({"CamelCased"=> {"KeyOne"=>"value","keyTwo"=>"value"}})
# => {"camel_cased" => {"key_one"=>"value", "key_two"=>"value"}}
def normalize_keys(hash)
new_hash = {}
- hash.first[1].each_pair { |k,v| new_hash.merge!(underscore(k) => v) }
+ hash.first[1].each_pair { |k,v| new_hash.merge!(underscore(k).to_sym => v) }
{underscore(hash.first[0]) => new_hash}
end
# Stolen from Rails 2.3.5
#