{"action":"created","issue":{"url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/252","labels_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/252/labels{/name}","comments_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/252/comments","events_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/252/events","html_url":"https://github.com/cerebris/jsonapi-resources/issues/252","id":86986381,"number":252,"title":"How can I specify the collection I want to render?","user":{"login":"mrcasals","id":491891,"avatar_url":"https://avatars.githubusercontent.com/u/491891?v=3","gravatar_id":"","url":"https://api.github.com/users/mrcasals","html_url":"https://github.com/mrcasals","followers_url":"https://api.github.com/users/mrcasals/followers","following_url":"https://api.github.com/users/mrcasals/following{/other_user}","gists_url":"https://api.github.com/users/mrcasals/gists{/gist_id}","starred_url":"https://api.github.com/users/mrcasals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrcasals/subscriptions","organizations_url":"https://api.github.com/users/mrcasals/orgs","repos_url":"https://api.github.com/users/mrcasals/repos","events_url":"https://api.github.com/users/mrcasals/events{/privacy}","received_events_url":"https://api.github.com/users/mrcasals/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-10T14:19:40Z","updated_at":"2015-06-11T06:54:04Z","closed_at":"2015-06-11T06:54:04Z","body":"Hi!\r\n\r\nI have a `Post` model in my app, and I want  my API to return just a subset of those posts (say, for example, `Post.published`, or `Post.all.select { |post| post.comments.empty? }`. I found the code of the controller, but it looks like there's no good way to customize the collection I'm rendering:\r\n\r\nhttps://github.com/cerebris/jsonapi-resources/blob/master/lib/jsonapi/acts_as_resource_controller.rb\r\n\r\nKind of related to #251, as this issue is also asking for a way to overwrite defaults.\r\n\r\nThank you!"},"comment":{"url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/comments/111016465","html_url":"https://github.com/cerebris/jsonapi-resources/issues/252#issuecomment-111016465","issue_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/252","id":111016465,"user":{"login":"mrcasals","id":491891,"avatar_url":"https://avatars.githubusercontent.com/u/491891?v=3","gravatar_id":"","url":"https://api.github.com/users/mrcasals","html_url":"https://github.com/mrcasals","followers_url":"https://api.github.com/users/mrcasals/followers","following_url":"https://api.github.com/users/mrcasals/following{/other_user}","gists_url":"https://api.github.com/users/mrcasals/gists{/gist_id}","starred_url":"https://api.github.com/users/mrcasals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrcasals/subscriptions","organizations_url":"https://api.github.com/users/mrcasals/orgs","repos_url":"https://api.github.com/users/mrcasals/repos","events_url":"https://api.github.com/users/mrcasals/events{/privacy}","received_events_url":"https://api.github.com/users/mrcasals/received_events","type":"User","site_admin":false},"created_at":"2015-06-11T06:54:04Z","updated_at":"2015-06-11T06:54:04Z","body":"No offense taken, don't worry about that. I'll give it a go, thanks!"}}