lib/cloudist/utils.rb in cloudist-0.0.2 vs lib/cloudist/utils.rb in cloudist-0.0.3

- old
+ new

@@ -30,7 +30,16 @@ rand(0x1000000), rand(0x1000000), ] "%04x%04x%04x%04x%04x%06x%06x" % values end + + def decode_json(string) + if defined? ActiveSupport::JSON + ActiveSupport::JSON.decode string + else + JSON.load string + end + end + end end