{"action":"created","issue":{"url":"https://api.github.com/repos/AmpersandJS/ampersand-collection-view/issues/29","labels_url":"https://api.github.com/repos/AmpersandJS/ampersand-collection-view/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/AmpersandJS/ampersand-collection-view/issues/29/comments","events_url":"https://api.github.com/repos/AmpersandJS/ampersand-collection-view/issues/29/events","html_url":"https://github.com/AmpersandJS/ampersand-collection-view/pull/29","id":58811324,"number":29,"title":"Empty view with parent","user":{"login":"layflags","id":791764,"avatar_url":"https://avatars.githubusercontent.com/u/791764?v=3","gravatar_id":"","url":"https://api.github.com/users/layflags","html_url":"https://github.com/layflags","followers_url":"https://api.github.com/users/layflags/followers","following_url":"https://api.github.com/users/layflags/following{/other_user}","gists_url":"https://api.github.com/users/layflags/gists{/gist_id}","starred_url":"https://api.github.com/users/layflags/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/layflags/subscriptions","organizations_url":"https://api.github.com/users/layflags/orgs","repos_url":"https://api.github.com/users/layflags/repos","events_url":"https://api.github.com/users/layflags/events{/privacy}","received_events_url":"https://api.github.com/users/layflags/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/AmpersandJS/ampersand-collection-view/labels/enhancement","name":"enhancement","color":"207de5"},{"url":"https://api.github.com/repos/AmpersandJS/ampersand-collection-view/labels/request","name":"request","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-24T21:50:46Z","updated_at":"2015-02-24T22:44:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/AmpersandJS/ampersand-collection-view/pulls/29","html_url":"https://github.com/AmpersandJS/ampersand-collection-view/pull/29","diff_url":"https://github.com/AmpersandJS/ampersand-collection-view/pull/29.diff","patch_url":"https://github.com/AmpersandJS/ampersand-collection-view/pull/29.patch"},"body":"Hi there,\r\n\r\nThe `parent` property is not set on `emptyView`s like with child views, so I had to use this workaround:\r\n\r\n```javascript\r\nvar myCollectionView = this.renderCollection(\r\n  myCollection,\r\n  MyView,\r\n  this.queryByHook('myView'),\r\n  {\r\n    emptyView: function () {\r\n      return new MyEmptyView({\r\n        parent: myCollectionView\r\n      });\r\n    }\r\n  }\r\n);\r\n```\r\n\r\nFor the sake of consistency it would be great if the `parent` property would be set automatically for `emptyView`s. So I only had to write:\r\n\r\n```javascript\r\nvar myCollectionView = this.renderCollection(\r\n  myCollection,\r\n  MyView,\r\n  this.queryByHook('myView'),\r\n  {\r\n    emptyView: MyEmptyView\r\n  }\r\n);\r\n```\r\n\r\nThat's what this PR is all about."},"comment":{"url":"https://api.github.com/repos/AmpersandJS/ampersand-collection-view/issues/comments/75863487","html_url":"https://github.com/AmpersandJS/ampersand-collection-view/pull/29#issuecomment-75863487","issue_url":"https://api.github.com/repos/AmpersandJS/ampersand-collection-view/issues/29","id":75863487,"user":{"login":"kamilogorek","id":1523305,"avatar_url":"https://avatars.githubusercontent.com/u/1523305?v=3","gravatar_id":"","url":"https://api.github.com/users/kamilogorek","html_url":"https://github.com/kamilogorek","followers_url":"https://api.github.com/users/kamilogorek/followers","following_url":"https://api.github.com/users/kamilogorek/following{/other_user}","gists_url":"https://api.github.com/users/kamilogorek/gists{/gist_id}","starred_url":"https://api.github.com/users/kamilogorek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamilogorek/subscriptions","organizations_url":"https://api.github.com/users/kamilogorek/orgs","repos_url":"https://api.github.com/users/kamilogorek/repos","events_url":"https://api.github.com/users/kamilogorek/events{/privacy}","received_events_url":"https://api.github.com/users/kamilogorek/received_events","type":"User","site_admin":false},"created_at":"2015-02-24T22:44:13Z","updated_at":"2015-02-24T22:44:13Z","body":"Sounds good to me, not much overhead, tests in place. Thanks!"}}