提交 a9163b54 编写于 作者: A Alexey Nayden 提交者: Santiago Pastorino

Complex struct encoding fix

[#6077 state:committed]
Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
上级 d2c17dbd
......@@ -153,6 +153,12 @@ def as_json(options = nil) #:nodoc:
end
end
class Struct
def as_json(options = nil) #:nodoc:
Hash[members.zip(values)]
end
end
class TrueClass
AS_JSON = ActiveSupport::JSON::Variable.new('true').freeze
def as_json(options = nil) AS_JSON end #:nodoc:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册