提交 8baed8cf 编写于 作者: E Eileen Uchitelle

Fix active model tests

上级 6b5fe5f9
......@@ -22,7 +22,13 @@ def encode(object)
if AsJSONEncoder.internal_as_json?(object)
visit object
else
encode object.as_json
# **ONLY** top level objects implementing as_json should
# get the options hash
if !@as_json_options.nil?
self.class.new(nil).encode object.as_json(@as_json_options.dup)
else
self.class.new(nil).encode object.as_json
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册