Permalink
Browse files

fixes multi_json deprecation messages for encode and decode, now dump…

… and load
  • Loading branch information...
1 parent f6d9b39 commit 69a4960e036c22e976d803bbfd5762227c519612 @schofield schofield committed Jun 8, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/risky.rb
View
@@ -418,7 +418,7 @@ def load_riak_object(riak_object, opts = {:merge => true})
self.merged = true
else
# Not merging
- self.values = self.class.cast(MultiJson.decode(riak_object.raw_data)) rescue {}
+ self.values = self.class.cast(MultiJson.load(riak_object.raw_data)) rescue {}
self.class.values.each do |k, v|
if values[k].nil?
values[k] = (v[:default].clone rescue v[:default])
@@ -495,7 +495,7 @@ def save(opts = {})
return false unless valid?
end
- @riak_object.raw_data = MultiJson.encode @values
+ @riak_object.raw_data = MultiJson.dump @values
@riak_object.content_type = "application/json"
store_opts = {}

0 comments on commit 69a4960

Please sign in to comment.