{"action":"opened","issue":{"url":"https://api.github.com/repos/HitFox/foxinator-generator/issues/20","labels_url":"https://api.github.com/repos/HitFox/foxinator-generator/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/HitFox/foxinator-generator/issues/20/comments","events_url":"https://api.github.com/repos/HitFox/foxinator-generator/issues/20/events","html_url":"https://github.com/HitFox/foxinator-generator/issues/20","id":93979300,"number":20,"title":"Pleasse add a clean collection method to helpers","user":{"login":"itschn","id":31039,"avatar_url":"https://avatars.githubusercontent.com/u/31039?v=3","gravatar_id":"","url":"https://api.github.com/users/itschn","html_url":"https://github.com/itschn","followers_url":"https://api.github.com/users/itschn/followers","following_url":"https://api.github.com/users/itschn/following{/other_user}","gists_url":"https://api.github.com/users/itschn/gists{/gist_id}","starred_url":"https://api.github.com/users/itschn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itschn/subscriptions","organizations_url":"https://api.github.com/users/itschn/orgs","repos_url":"https://api.github.com/users/itschn/repos","events_url":"https://api.github.com/users/itschn/events{/privacy}","received_events_url":"https://api.github.com/users/itschn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-09T07:33:28Z","updated_at":"2015-07-09T07:33:28Z","closed_at":null,"body":"This give us the ability to count on top level collection without having any filters ot nestings applied.\r\n```ruby\r\n  def clean_collection\r\n    @clean_collection ||= if current_parent\r\n      current_parent.send(resource_collection_name)\r\n    else\r\n      resource_class\r\n    end\r\n  end\r\n```"}}