{"action":"created","comment":{"url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/comments/60257856","id":60257856,"diff_hunk":"@@ -124,6 +125,13 @@ def update_metadata\n \n     protected\n \n+      def unlink_from_work(file_set, work)","path":"app/controllers/concerns/curation_concerns/file_sets_controller_behavior.rb","position":12,"original_position":12,"commit_id":"8e675bfb6ed75c94dd4d21174d1b4df2500f8308","original_commit_id":"8e675bfb6ed75c94dd4d21174d1b4df2500f8308","user":{"login":"jcoyne","id":92044,"avatar_url":"https://avatars.githubusercontent.com/u/92044?v=3","gravatar_id":"","url":"https://api.github.com/users/jcoyne","html_url":"https://github.com/jcoyne","followers_url":"https://api.github.com/users/jcoyne/followers","following_url":"https://api.github.com/users/jcoyne/following{/other_user}","gists_url":"https://api.github.com/users/jcoyne/gists{/gist_id}","starred_url":"https://api.github.com/users/jcoyne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcoyne/subscriptions","organizations_url":"https://api.github.com/users/jcoyne/orgs","repos_url":"https://api.github.com/users/jcoyne/repos","events_url":"https://api.github.com/users/jcoyne/events{/privacy}","received_events_url":"https://api.github.com/users/jcoyne/received_events","type":"User","site_admin":false},"body":"Can you move this method into `actor.destroy`?","created_at":"2016-04-19T15:52:01Z","updated_at":"2016-04-19T15:52:01Z","html_url":"https://github.com/projecthydra-labs/curation_concerns/pull/732#discussion_r60257856","pull_request_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/732","_links":{"self":{"href":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/comments/60257856"},"html":{"href":"https://github.com/projecthydra-labs/curation_concerns/pull/732#discussion_r60257856"},"pull_request":{"href":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/732"}}},"pull_request":{"url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/732","id":66888881,"html_url":"https://github.com/projecthydra-labs/curation_concerns/pull/732","diff_url":"https://github.com/projecthydra-labs/curation_concerns/pull/732.diff","patch_url":"https://github.com/projecthydra-labs/curation_concerns/pull/732.patch","issue_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/issues/732","number":732,"state":"open","locked":false,"title":"Unlink file_set from work when file_set is deleted","user":{"login":"hectorcorrea","id":568286,"avatar_url":"https://avatars.githubusercontent.com/u/568286?v=3","gravatar_id":"","url":"https://api.github.com/users/hectorcorrea","html_url":"https://github.com/hectorcorrea","followers_url":"https://api.github.com/users/hectorcorrea/followers","following_url":"https://api.github.com/users/hectorcorrea/following{/other_user}","gists_url":"https://api.github.com/users/hectorcorrea/gists{/gist_id}","starred_url":"https://api.github.com/users/hectorcorrea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hectorcorrea/subscriptions","organizations_url":"https://api.github.com/users/hectorcorrea/orgs","repos_url":"https://api.github.com/users/hectorcorrea/repos","events_url":"https://api.github.com/users/hectorcorrea/events{/privacy}","received_events_url":"https://api.github.com/users/hectorcorrea/received_events","type":"User","site_admin":false},"body":"When a `FileSet` is deleted we need to make sure the `GenericWork` does not point to it anymore. This PR makes sure that neither `GenericWork.thumbnail` nor `GenericWork.representative` point to a `FileSet` after being deleted.\r\n\r\nThis issue was first reported in `Sufia` https://github.com/projecthydra/sufia/issues/1852 but also applies to `CurationConcerns`.\r\n\r\nDo not merge yet, I still need to add a couple of tests  before this is ready.\r\n\r\n@projecthydra/sufia-code-reviewers","created_at":"2016-04-18T17:12:35Z","updated_at":"2016-04-19T15:52:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6573cb0c7e2264cd899f0634eee1d685b2b32d14","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/732/commits","review_comments_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/732/comments","review_comment_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/issues/732/comments","statuses_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/statuses/8e675bfb6ed75c94dd4d21174d1b4df2500f8308","head":{"label":"projecthydra-labs:delete_file_set","ref":"delete_file_set","sha":"8e675bfb6ed75c94dd4d21174d1b4df2500f8308","user":{"login":"projecthydra-labs","id":7377013,"avatar_url":"https://avatars.githubusercontent.com/u/7377013?v=3","gravatar_id":"","url":"https://api.github.com/users/projecthydra-labs","html_url":"https://github.com/projecthydra-labs","followers_url":"https://api.github.com/users/projecthydra-labs/followers","following_url":"https://api.github.com/users/projecthydra-labs/following{/other_user}","gists_url":"https://api.github.com/users/projecthydra-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/projecthydra-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecthydra-labs/subscriptions","organizations_url":"https://api.github.com/users/projecthydra-labs/orgs","repos_url":"https://api.github.com/users/projecthydra-labs/repos","events_url":"https://api.github.com/users/projecthydra-labs/events{/privacy}","received_events_url":"https://api.github.com/users/projecthydra-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":35563024,"name":"curation_concerns","full_name":"projecthydra-labs/curation_concerns","owner":{"login":"projecthydra-labs","id":7377013,"avatar_url":"https://avatars.githubusercontent.com/u/7377013?v=3","gravatar_id":"","url":"https://api.github.com/users/projecthydra-labs","html_url":"https://github.com/projecthydra-labs","followers_url":"https://api.github.com/users/projecthydra-labs/followers","following_url":"https://api.github.com/users/projecthydra-labs/following{/other_user}","gists_url":"https://api.github.com/users/projecthydra-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/projecthydra-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecthydra-labs/subscriptions","organizations_url":"https://api.github.com/users/projecthydra-labs/orgs","repos_url":"https://api.github.com/users/projecthydra-labs/repos","events_url":"https://api.github.com/users/projecthydra-labs/events{/privacy}","received_events_url":"https://api.github.com/users/projecthydra-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projecthydra-labs/curation_concerns","description":"A Hydra-based Rails Engine that extends an application, adding the ability to Create, Read, Update and Destroy (CRUD) objects (based on Hydra::Works) and providing a generator for defining object types with custom workflows, views, access controls, etc.","fork":false,"url":"https://api.github.com/repos/projecthydra-labs/curation_concerns","forks_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/forks","keys_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/teams","hooks_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/hooks","issue_events_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/issues/events{/number}","events_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/events","assignees_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/assignees{/user}","branches_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/branches{/branch}","tags_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/tags","blobs_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/git/refs{/sha}","trees_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/statuses/{sha}","languages_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/languages","stargazers_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/stargazers","contributors_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/contributors","subscribers_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/subscribers","subscription_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/subscription","commits_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/commits{/sha}","git_commits_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/git/commits{/sha}","comments_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/comments{/number}","issue_comment_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/issues/comments{/number}","contents_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/contents/{+path}","compare_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/merges","archive_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/downloads","issues_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/issues{/number}","pulls_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls{/number}","milestones_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/milestones{/number}","notifications_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/labels{/name}","releases_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/releases{/id}","deployments_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/deployments","created_at":"2015-05-13T17:17:45Z","updated_at":"2016-03-18T03:32:38Z","pushed_at":"2016-04-19T14:44:41Z","git_url":"git://github.com/projecthydra-labs/curation_concerns.git","ssh_url":"git@github.com:projecthydra-labs/curation_concerns.git","clone_url":"https://github.com/projecthydra-labs/curation_concerns.git","svn_url":"https://github.com/projecthydra-labs/curation_concerns","homepage":"","size":54576,"stargazers_count":7,"watchers_count":7,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":41,"forks":12,"open_issues":41,"watchers":7,"default_branch":"master"}},"base":{"label":"projecthydra-labs:master","ref":"master","sha":"28053bffe8f674f826aa1190cefd171f5244fc10","user":{"login":"projecthydra-labs","id":7377013,"avatar_url":"https://avatars.githubusercontent.com/u/7377013?v=3","gravatar_id":"","url":"https://api.github.com/users/projecthydra-labs","html_url":"https://github.com/projecthydra-labs","followers_url":"https://api.github.com/users/projecthydra-labs/followers","following_url":"https://api.github.com/users/projecthydra-labs/following{/other_user}","gists_url":"https://api.github.com/users/projecthydra-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/projecthydra-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecthydra-labs/subscriptions","organizations_url":"https://api.github.com/users/projecthydra-labs/orgs","repos_url":"https://api.github.com/users/projecthydra-labs/repos","events_url":"https://api.github.com/users/projecthydra-labs/events{/privacy}","received_events_url":"https://api.github.com/users/projecthydra-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":35563024,"name":"curation_concerns","full_name":"projecthydra-labs/curation_concerns","owner":{"login":"projecthydra-labs","id":7377013,"avatar_url":"https://avatars.githubusercontent.com/u/7377013?v=3","gravatar_id":"","url":"https://api.github.com/users/projecthydra-labs","html_url":"https://github.com/projecthydra-labs","followers_url":"https://api.github.com/users/projecthydra-labs/followers","following_url":"https://api.github.com/users/projecthydra-labs/following{/other_user}","gists_url":"https://api.github.com/users/projecthydra-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/projecthydra-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecthydra-labs/subscriptions","organizations_url":"https://api.github.com/users/projecthydra-labs/orgs","repos_url":"https://api.github.com/users/projecthydra-labs/repos","events_url":"https://api.github.com/users/projecthydra-labs/events{/privacy}","received_events_url":"https://api.github.com/users/projecthydra-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projecthydra-labs/curation_concerns","description":"A Hydra-based Rails Engine that extends an application, adding the ability to Create, Read, Update and Destroy (CRUD) objects (based on Hydra::Works) and providing a generator for defining object types with custom workflows, views, access controls, etc.","fork":false,"url":"https://api.github.com/repos/projecthydra-labs/curation_concerns","forks_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/forks","keys_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/teams","hooks_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/hooks","issue_events_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/issues/events{/number}","events_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/events","assignees_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/assignees{/user}","branches_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/branches{/branch}","tags_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/tags","blobs_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/git/refs{/sha}","trees_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/statuses/{sha}","languages_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/languages","stargazers_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/stargazers","contributors_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/contributors","subscribers_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/subscribers","subscription_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/subscription","commits_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/commits{/sha}","git_commits_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/git/commits{/sha}","comments_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/comments{/number}","issue_comment_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/issues/comments{/number}","contents_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/contents/{+path}","compare_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/merges","archive_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/downloads","issues_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/issues{/number}","pulls_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls{/number}","milestones_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/milestones{/number}","notifications_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/labels{/name}","releases_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/releases{/id}","deployments_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/deployments","created_at":"2015-05-13T17:17:45Z","updated_at":"2016-03-18T03:32:38Z","pushed_at":"2016-04-19T14:44:41Z","git_url":"git://github.com/projecthydra-labs/curation_concerns.git","ssh_url":"git@github.com:projecthydra-labs/curation_concerns.git","clone_url":"https://github.com/projecthydra-labs/curation_concerns.git","svn_url":"https://github.com/projecthydra-labs/curation_concerns","homepage":"","size":54576,"stargazers_count":7,"watchers_count":7,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":41,"forks":12,"open_issues":41,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/732"},"html":{"href":"https://github.com/projecthydra-labs/curation_concerns/pull/732"},"issue":{"href":"https://api.github.com/repos/projecthydra-labs/curation_concerns/issues/732"},"comments":{"href":"https://api.github.com/repos/projecthydra-labs/curation_concerns/issues/732/comments"},"review_comments":{"href":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/732/comments"},"review_comment":{"href":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/732/commits"},"statuses":{"href":"https://api.github.com/repos/projecthydra-labs/curation_concerns/statuses/8e675bfb6ed75c94dd4d21174d1b4df2500f8308"}}}}