Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/representable/json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ def collection_representer_class

# Parses the body as JSON and delegates to #from_hash.
def from_json(data, *args)
data = MultiJson.load(data)
data = MultiJSON.parse(data)
from_hash(data, *args)
end

# Returns a JSON string representing this object.
def to_json(*args)
MultiJson.dump to_hash(*args)
MultiJSON.generate to_hash(*args)
end

alias_method :render, :to_json
Expand Down