{"action":"created","issue":{"url":"https://api.github.com/repos/stefankroes/ancestry/issues/213","labels_url":"https://api.github.com/repos/stefankroes/ancestry/issues/213/labels{/name}","comments_url":"https://api.github.com/repos/stefankroes/ancestry/issues/213/comments","events_url":"https://api.github.com/repos/stefankroes/ancestry/issues/213/events","html_url":"https://github.com/stefankroes/ancestry/issues/213","id":48037901,"number":213,"title":"Serialization options to include/except attributes with arrange_serializable","user":{"login":"ArTiSTiX","id":1231011,"avatar_url":"https://avatars.githubusercontent.com/u/1231011?v=3","gravatar_id":"","url":"https://api.github.com/users/ArTiSTiX","html_url":"https://github.com/ArTiSTiX","followers_url":"https://api.github.com/users/ArTiSTiX/followers","following_url":"https://api.github.com/users/ArTiSTiX/following{/other_user}","gists_url":"https://api.github.com/users/ArTiSTiX/gists{/gist_id}","starred_url":"https://api.github.com/users/ArTiSTiX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArTiSTiX/subscriptions","organizations_url":"https://api.github.com/users/ArTiSTiX/orgs","repos_url":"https://api.github.com/users/ArTiSTiX/repos","events_url":"https://api.github.com/users/ArTiSTiX/events{/privacy}","received_events_url":"https://api.github.com/users/ArTiSTiX/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-11-07T01:36:09Z","updated_at":"2015-05-11T06:44:57Z","closed_at":null,"body":"I'm currently having some difficulties with arrange_serializable.\r\nI eager load some of relations of the hierarchical model... but there seems to be no options to add those fields in serialization...\r\n\r\nI'm doing:\r\n\r\n```ruby\r\nMyModel.first.subtree.select(:id,:ancestry,:user_id).includes(:user).arrange_serializable\r\n```\r\n\r\nBut user relation is not serialized.\r\nI expect something like:\r\n```json\r\n{\r\n  \"id\": 1, \"ancestry\": null, \"user_id\": 1,\r\n  \"user\": {\"id\": 34, \"name\": \"John Doe\"},\r\n  \"children\": [\r\n    {\r\n      \"id\": 2, \"ancestry\": \"1\", \"user_id\": 2,\r\n      \"user\": {\"id\": 32, \"name\": \"Chuck Norris\"},\r\n      \"children\": []\r\n    },\r\n    {\r\n      \"id\": 4, \"ancestry\": \"1\", \"user_id\": 2,\r\n      \"user\": {\"id\": 32, \"name\": \"Chuck Norris\"},\r\n      \"children\": []\r\n    }\r\n  ]\r\n}\r\n```\r\nAny practice to do this with arrange_serializable ?\r\n"},"comment":{"url":"https://api.github.com/repos/stefankroes/ancestry/issues/comments/100788199","html_url":"https://github.com/stefankroes/ancestry/issues/213#issuecomment-100788199","issue_url":"https://api.github.com/repos/stefankroes/ancestry/issues/213","id":100788199,"user":{"login":"stefankroes","id":37841,"avatar_url":"https://avatars.githubusercontent.com/u/37841?v=3","gravatar_id":"","url":"https://api.github.com/users/stefankroes","html_url":"https://github.com/stefankroes","followers_url":"https://api.github.com/users/stefankroes/followers","following_url":"https://api.github.com/users/stefankroes/following{/other_user}","gists_url":"https://api.github.com/users/stefankroes/gists{/gist_id}","starred_url":"https://api.github.com/users/stefankroes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefankroes/subscriptions","organizations_url":"https://api.github.com/users/stefankroes/orgs","repos_url":"https://api.github.com/users/stefankroes/repos","events_url":"https://api.github.com/users/stefankroes/events{/privacy}","received_events_url":"https://api.github.com/users/stefankroes/received_events","type":"User","site_admin":false},"created_at":"2015-05-11T06:44:57Z","updated_at":"2015-05-11T06:44:57Z","body":"I don't think Ancestry should be concerned with serialization. If you want to arrange but have access to full models with eager loaded associations, why not use regular `#arrange`?"}}