Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

converting country to json leads to deep recursion #209

Closed
zarelit opened this issue Jul 27, 2016 · 2 comments
Closed

converting country to json leads to deep recursion #209

zarelit opened this issue Jul 27, 2016 · 2 comments

Comments

@zarelit
Copy link
Contributor

zarelit commented Jul 27, 2016

When using Carmen in Rails, converting a Country to JSON results in a SystemStackError: stack level too deep error.

Steps to reproduce:

  1. open rails console
  2. us = Carmen::Country.named('United States')
  3. us.to_json
@ghost
Copy link

ghost commented Jul 27, 2016

I was able to reproduce. Thanks for reporting.

@ghost ghost self-assigned this Jul 27, 2016
@ricas07
Copy link

ricas07 commented Nov 10, 2016

Is there a solution to this? How do I return a json object including country and subregions?

@jim jim closed this as completed in f97bca9 Oct 7, 2017
jim added a commit that referenced this issue Oct 7, 2017
Add serializers friendly to_hash. Fixes #209
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants