{"action":"created","issue":{"url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/908","labels_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/908/labels{/name}","comments_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/908/comments","events_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/908/events","html_url":"https://github.com/rails-api/active_model_serializers/issues/908","id":74968904,"number":908,"title":"ams 0.9.3 not embedding ids or sideloading objects (stack level too deep)","user":{"login":"KurtRMueller","id":879734,"avatar_url":"https://avatars.githubusercontent.com/u/879734?v=3","gravatar_id":"","url":"https://api.github.com/users/KurtRMueller","html_url":"https://github.com/KurtRMueller","followers_url":"https://api.github.com/users/KurtRMueller/followers","following_url":"https://api.github.com/users/KurtRMueller/following{/other_user}","gists_url":"https://api.github.com/users/KurtRMueller/gists{/gist_id}","starred_url":"https://api.github.com/users/KurtRMueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KurtRMueller/subscriptions","organizations_url":"https://api.github.com/users/KurtRMueller/orgs","repos_url":"https://api.github.com/users/KurtRMueller/repos","events_url":"https://api.github.com/users/KurtRMueller/events{/privacy}","received_events_url":"https://api.github.com/users/KurtRMueller/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rails-api/active_model_serializers/labels/0.9.x","name":"0.9.x","color":"bfdadc"},{"url":"https://api.github.com/repos/rails-api/active_model_serializers/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/rails-api/active_model_serializers/labels/Needs%20Bug%20Verification","name":"Needs Bug Verification","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-05-10T18:07:16Z","updated_at":"2015-06-26T12:50:52Z","closed_at":null,"body":"Hey everybody,\r\n\r\nI'm using `rails 4.2.1`, `rails-api`, and `ams 0.9.3`. My initializer, `config/initializers/active_model_serializers.rb`. has the following:\r\n\r\n```ruby\r\nActiveModel::Serializer.setup do |config|\r\n  config.embed = :ids\r\n  config.embed_in_root = true\r\nend\r\n```\r\n\r\nHere are my serializers:\r\n\r\n```ruby\r\n# breed_serializer.b\r\nclass BreedSerializer < ActiveModel::Serializer\r\n  attributes :id, :name, :dogs_count\r\n  has_many :dogs\r\nend\r\n\r\n# dog_serializer.rb\r\nclass DogSerializer < ActiveModel::Serializer\r\n  attributes :id, :name\r\n  has_one :breed\r\nend\r\n```\r\n\r\nUnfortunately, here's what happens when I run `BreedSerializer.new(Breed.first).to_json` in the console:\r\n\r\n```\r\nBreed Load (1.1ms)  SELECT  \"breeds\".* FROM \"breeds\"  ORDER BY \"breeds\".\"id\" ASC LIMIT 1\r\nDog Load (2.1ms)  SELECT \"dogs\".* FROM \"dogs\" WHERE \"dogs\".\"breed_id\" = $1  [[\"breed_id\", 1]]\r\nSystemStackError: stack level too deep\r\n```"},"comment":{"url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/comments/115669104","html_url":"https://github.com/rails-api/active_model_serializers/issues/908#issuecomment-115669104","issue_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/908","id":115669104,"user":{"login":"hendricius","id":816859,"avatar_url":"https://avatars.githubusercontent.com/u/816859?v=3","gravatar_id":"","url":"https://api.github.com/users/hendricius","html_url":"https://github.com/hendricius","followers_url":"https://api.github.com/users/hendricius/followers","following_url":"https://api.github.com/users/hendricius/following{/other_user}","gists_url":"https://api.github.com/users/hendricius/gists{/gist_id}","starred_url":"https://api.github.com/users/hendricius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hendricius/subscriptions","organizations_url":"https://api.github.com/users/hendricius/orgs","repos_url":"https://api.github.com/users/hendricius/repos","events_url":"https://api.github.com/users/hendricius/events{/privacy}","received_events_url":"https://api.github.com/users/hendricius/received_events","type":"User","site_admin":false},"created_at":"2015-06-26T12:50:52Z","updated_at":"2015-06-26T12:50:52Z","body":":+1: let's focus on `0.10` and sort out the other issues later."}}