Using custom to_json method in nested objects

后端 未结 3 714
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-05 12:06

I have a data structure that uses the Set class from the Ruby Standard Library. I\'d like to be able to serialize my data structure to a JSON string.

By default, Set

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-05 12:54

    Looking for a solution on the same problem, i found this bug report on the Rails issue tracker. Besides it was closed, i suppose it still happens on the earlier versions. Hope it could help.

    https://github.com/rails/rails/issues/576

提交回复
热议问题