mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Complex struct encoding fix
[#6077 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
This commit is contained in:
parent
d2c17dbd11
commit
a9163b547c
1 changed files with 6 additions and 0 deletions
|
@ -153,6 +153,12 @@ class Object
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class Struct
|
||||||
|
def as_json(options = nil) #:nodoc:
|
||||||
|
Hash[members.zip(values)]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
class TrueClass
|
class TrueClass
|
||||||
AS_JSON = ActiveSupport::JSON::Variable.new('true').freeze
|
AS_JSON = ActiveSupport::JSON::Variable.new('true').freeze
|
||||||
def as_json(options = nil) AS_JSON end #:nodoc:
|
def as_json(options = nil) AS_JSON end #:nodoc:
|
||||||
|
|
Loading…
Reference in a new issue