Skip to content

Commit

Permalink
fixes multi_json deprecation messages for encode and decode, now dump…
Browse files Browse the repository at this point in the history
… and load
  • Loading branch information
schofield committed Jun 8, 2012
1 parent f6d9b39 commit 69a4960
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/risky.rb
Expand Up @@ -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])
Expand Down Expand Up @@ -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 = {}
Expand Down

0 comments on commit 69a4960

Please sign in to comment.