Closed drcapulet closed 6 years ago
This PR fixes two regressions from #385.
First, to_json needs to return a string:
to_json
irb(main):003:0> 5.to_json => "5"
Second, when using JSON.dump, to_json is expected to take a JSON::State argument - see ActiveSupport's comment here.
JSON.dump
JSON::State
Thanks @drcapulet ! I'll look at the to_i stuff later.
to_i
This PR fixes two regressions from #385.
First,
to_json
needs to return a string:Second, when using
JSON.dump
,to_json
is expected to take aJSON::State
argument - see ActiveSupport's comment here.