Permalink
Browse files

Prefer JSON.encode(value) to value.to_json

  • Loading branch information...
1 parent 14de1a9 commit 5b256ac36922b4dfa4ab7aa639757c4817d06680 @jeremy jeremy committed Jun 9, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 activeresource/lib/active_resource/formats/json_format.rb
@@ -13,8 +13,8 @@ def mime_type
"application/json"
end
- def encode(hash, options={})
- hash.to_json(options)
+ def encode(hash, options = nil)
+ ActiveSupport::JSON.encode(hash, options)
end
def decode(json)

0 comments on commit 5b256ac

Please sign in to comment.