{"action":"created","comment":{"url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/pulls/comments/81017390","pull_request_review_id":2009051,"id":81017390,"diff_hunk":"@@ -19,11 +16,16 @@ class ShareImageModal {\n \n   static generateFlashMessage(type, msg) {\n     if ($(`div.alert-${type}:contains(${msg})`).length <= 0) {\n-      ShareImageModal.deleteFlashMessage();\n+      ShareImageModal.clearFlashMessage();\n       $('.js-body-container').prepend(`<div class=\"alert alert-${type}\">${msg}</div>`);\n     }\n   }\n \n+  clearForm() {\n+    this.$shareForm.empty().append(this.cleanFormHTML);\n+    this.constructor('#share_image_modal');","path":"app/assets/javascripts/images/share_image_modal.js","position":null,"original_position":29,"commit_id":"45dc077e7f415cd40a4fbfc10f27ab0aac73f699","original_commit_id":"45dc077e7f415cd40a4fbfc10f27ab0aac73f699","user":{"login":"rmacklin","id":1863540,"avatar_url":"https://avatars.githubusercontent.com/u/1863540?v=3","gravatar_id":"","url":"https://api.github.com/users/rmacklin","html_url":"https://github.com/rmacklin","followers_url":"https://api.github.com/users/rmacklin/followers","following_url":"https://api.github.com/users/rmacklin/following{/other_user}","gists_url":"https://api.github.com/users/rmacklin/gists{/gist_id}","starred_url":"https://api.github.com/users/rmacklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmacklin/subscriptions","organizations_url":"https://api.github.com/users/rmacklin/orgs","repos_url":"https://api.github.com/users/rmacklin/repos","events_url":"https://api.github.com/users/rmacklin/events{/privacy}","received_events_url":"https://api.github.com/users/rmacklin/received_events","type":"User","site_admin":false},"body":"Calling the constructor again for an already-constructed object is a bad pattern. As the constructor gains additional functionality, this could lead to bugs. In this case, it looks like it's only being done so that `this.$shareFormImage` will be reset. We could just remove that property and replace the one usage with `this.$shareForm.find('img')`.","created_at":"2016-09-28T21:06:33Z","updated_at":"2016-09-28T21:07:10Z","html_url":"https://github.com/AppFolioOnboarding/image-sharer-ragurney/pull/42#discussion_r81017390","pull_request_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/pulls/comments/81017390"},"html":{"href":"https://github.com/AppFolioOnboarding/image-sharer-ragurney/pull/42#discussion_r81017390"},"pull_request":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/pulls/42","id":87037481,"html_url":"https://github.com/AppFolioOnboarding/image-sharer-ragurney/pull/42","diff_url":"https://github.com/AppFolioOnboarding/image-sharer-ragurney/pull/42.diff","patch_url":"https://github.com/AppFolioOnboarding/image-sharer-ragurney/pull/42.patch","issue_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/issues/42","number":42,"state":"open","locked":false,"title":"Image share with modal","user":{"login":"ragurney","id":15261525,"avatar_url":"https://avatars.githubusercontent.com/u/15261525?v=3","gravatar_id":"","url":"https://api.github.com/users/ragurney","html_url":"https://github.com/ragurney","followers_url":"https://api.github.com/users/ragurney/followers","following_url":"https://api.github.com/users/ragurney/following{/other_user}","gists_url":"https://api.github.com/users/ragurney/gists{/gist_id}","starred_url":"https://api.github.com/users/ragurney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ragurney/subscriptions","organizations_url":"https://api.github.com/users/ragurney/orgs","repos_url":"https://api.github.com/users/ragurney/repos","events_url":"https://api.github.com/users/ragurney/events{/privacy}","received_events_url":"https://api.github.com/users/ragurney/received_events","type":"User","site_admin":false},"body":"Closes #10 \r\nImage share with modal \r\n","created_at":"2016-09-28T00:45:33Z","updated_at":"2016-09-28T21:21:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"960106fc9bd41f62ed413c708233df922d5bff2d","assignee":{"login":"rmacklin","id":1863540,"avatar_url":"https://avatars.githubusercontent.com/u/1863540?v=3","gravatar_id":"","url":"https://api.github.com/users/rmacklin","html_url":"https://github.com/rmacklin","followers_url":"https://api.github.com/users/rmacklin/followers","following_url":"https://api.github.com/users/rmacklin/following{/other_user}","gists_url":"https://api.github.com/users/rmacklin/gists{/gist_id}","starred_url":"https://api.github.com/users/rmacklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmacklin/subscriptions","organizations_url":"https://api.github.com/users/rmacklin/orgs","repos_url":"https://api.github.com/users/rmacklin/repos","events_url":"https://api.github.com/users/rmacklin/events{/privacy}","received_events_url":"https://api.github.com/users/rmacklin/received_events","type":"User","site_admin":false},"assignees":[{"login":"rmacklin","id":1863540,"avatar_url":"https://avatars.githubusercontent.com/u/1863540?v=3","gravatar_id":"","url":"https://api.github.com/users/rmacklin","html_url":"https://github.com/rmacklin","followers_url":"https://api.github.com/users/rmacklin/followers","following_url":"https://api.github.com/users/rmacklin/following{/other_user}","gists_url":"https://api.github.com/users/rmacklin/gists{/gist_id}","starred_url":"https://api.github.com/users/rmacklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmacklin/subscriptions","organizations_url":"https://api.github.com/users/rmacklin/orgs","repos_url":"https://api.github.com/users/rmacklin/repos","events_url":"https://api.github.com/users/rmacklin/events{/privacy}","received_events_url":"https://api.github.com/users/rmacklin/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/pulls/42/commits","review_comments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/pulls/42/comments","review_comment_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/issues/42/comments","statuses_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/statuses/45dc077e7f415cd40a4fbfc10f27ab0aac73f699","head":{"label":"AppFolioOnboarding:image-share-with-modal","ref":"image-share-with-modal","sha":"45dc077e7f415cd40a4fbfc10f27ab0aac73f699","user":{"login":"AppFolioOnboarding","id":16782391,"avatar_url":"https://avatars.githubusercontent.com/u/16782391?v=3","gravatar_id":"","url":"https://api.github.com/users/AppFolioOnboarding","html_url":"https://github.com/AppFolioOnboarding","followers_url":"https://api.github.com/users/AppFolioOnboarding/followers","following_url":"https://api.github.com/users/AppFolioOnboarding/following{/other_user}","gists_url":"https://api.github.com/users/AppFolioOnboarding/gists{/gist_id}","starred_url":"https://api.github.com/users/AppFolioOnboarding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AppFolioOnboarding/subscriptions","organizations_url":"https://api.github.com/users/AppFolioOnboarding/orgs","repos_url":"https://api.github.com/users/AppFolioOnboarding/repos","events_url":"https://api.github.com/users/AppFolioOnboarding/events{/privacy}","received_events_url":"https://api.github.com/users/AppFolioOnboarding/received_events","type":"Organization","site_admin":false},"repo":{"id":65857460,"name":"image-sharer-ragurney","full_name":"AppFolioOnboarding/image-sharer-ragurney","owner":{"login":"AppFolioOnboarding","id":16782391,"avatar_url":"https://avatars.githubusercontent.com/u/16782391?v=3","gravatar_id":"","url":"https://api.github.com/users/AppFolioOnboarding","html_url":"https://github.com/AppFolioOnboarding","followers_url":"https://api.github.com/users/AppFolioOnboarding/followers","following_url":"https://api.github.com/users/AppFolioOnboarding/following{/other_user}","gists_url":"https://api.github.com/users/AppFolioOnboarding/gists{/gist_id}","starred_url":"https://api.github.com/users/AppFolioOnboarding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AppFolioOnboarding/subscriptions","organizations_url":"https://api.github.com/users/AppFolioOnboarding/orgs","repos_url":"https://api.github.com/users/AppFolioOnboarding/repos","events_url":"https://api.github.com/users/AppFolioOnboarding/events{/privacy}","received_events_url":"https://api.github.com/users/AppFolioOnboarding/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AppFolioOnboarding/image-sharer-ragurney","description":"image-sharer-ragurney created by GitHub Classroom","fork":false,"url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney","forks_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/forks","keys_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/teams","hooks_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/hooks","issue_events_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/issues/events{/number}","events_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/events","assignees_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/assignees{/user}","branches_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/branches{/branch}","tags_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/tags","blobs_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/git/refs{/sha}","trees_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/statuses/{sha}","languages_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/languages","stargazers_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/stargazers","contributors_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/contributors","subscribers_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/subscribers","subscription_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/subscription","commits_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/commits{/sha}","git_commits_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/git/commits{/sha}","comments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/comments{/number}","issue_comment_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/issues/comments{/number}","contents_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/contents/{+path}","compare_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/merges","archive_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/downloads","issues_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/issues{/number}","pulls_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/pulls{/number}","milestones_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/milestones{/number}","notifications_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/labels{/name}","releases_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/releases{/id}","deployments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/deployments","created_at":"2016-08-16T22:20:56Z","updated_at":"2016-08-16T22:21:12Z","pushed_at":"2016-09-28T00:45:33Z","git_url":"git://github.com/AppFolioOnboarding/image-sharer-ragurney.git","ssh_url":"git@github.com:AppFolioOnboarding/image-sharer-ragurney.git","clone_url":"https://github.com/AppFolioOnboarding/image-sharer-ragurney.git","svn_url":"https://github.com/AppFolioOnboarding/image-sharer-ragurney","homepage":null,"size":177,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"AppFolioOnboarding:master","ref":"master","sha":"030a1ea34fe225bf18a79a4cd2a7e15564a2a495","user":{"login":"AppFolioOnboarding","id":16782391,"avatar_url":"https://avatars.githubusercontent.com/u/16782391?v=3","gravatar_id":"","url":"https://api.github.com/users/AppFolioOnboarding","html_url":"https://github.com/AppFolioOnboarding","followers_url":"https://api.github.com/users/AppFolioOnboarding/followers","following_url":"https://api.github.com/users/AppFolioOnboarding/following{/other_user}","gists_url":"https://api.github.com/users/AppFolioOnboarding/gists{/gist_id}","starred_url":"https://api.github.com/users/AppFolioOnboarding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AppFolioOnboarding/subscriptions","organizations_url":"https://api.github.com/users/AppFolioOnboarding/orgs","repos_url":"https://api.github.com/users/AppFolioOnboarding/repos","events_url":"https://api.github.com/users/AppFolioOnboarding/events{/privacy}","received_events_url":"https://api.github.com/users/AppFolioOnboarding/received_events","type":"Organization","site_admin":false},"repo":{"id":65857460,"name":"image-sharer-ragurney","full_name":"AppFolioOnboarding/image-sharer-ragurney","owner":{"login":"AppFolioOnboarding","id":16782391,"avatar_url":"https://avatars.githubusercontent.com/u/16782391?v=3","gravatar_id":"","url":"https://api.github.com/users/AppFolioOnboarding","html_url":"https://github.com/AppFolioOnboarding","followers_url":"https://api.github.com/users/AppFolioOnboarding/followers","following_url":"https://api.github.com/users/AppFolioOnboarding/following{/other_user}","gists_url":"https://api.github.com/users/AppFolioOnboarding/gists{/gist_id}","starred_url":"https://api.github.com/users/AppFolioOnboarding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AppFolioOnboarding/subscriptions","organizations_url":"https://api.github.com/users/AppFolioOnboarding/orgs","repos_url":"https://api.github.com/users/AppFolioOnboarding/repos","events_url":"https://api.github.com/users/AppFolioOnboarding/events{/privacy}","received_events_url":"https://api.github.com/users/AppFolioOnboarding/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AppFolioOnboarding/image-sharer-ragurney","description":"image-sharer-ragurney created by GitHub Classroom","fork":false,"url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney","forks_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/forks","keys_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/teams","hooks_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/hooks","issue_events_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/issues/events{/number}","events_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/events","assignees_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/assignees{/user}","branches_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/branches{/branch}","tags_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/tags","blobs_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/git/refs{/sha}","trees_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/statuses/{sha}","languages_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/languages","stargazers_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/stargazers","contributors_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/contributors","subscribers_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/subscribers","subscription_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/subscription","commits_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/commits{/sha}","git_commits_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/git/commits{/sha}","comments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/comments{/number}","issue_comment_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/issues/comments{/number}","contents_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/contents/{+path}","compare_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/merges","archive_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/downloads","issues_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/issues{/number}","pulls_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/pulls{/number}","milestones_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/milestones{/number}","notifications_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/labels{/name}","releases_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/releases{/id}","deployments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/deployments","created_at":"2016-08-16T22:20:56Z","updated_at":"2016-08-16T22:21:12Z","pushed_at":"2016-09-28T00:45:33Z","git_url":"git://github.com/AppFolioOnboarding/image-sharer-ragurney.git","ssh_url":"git@github.com:AppFolioOnboarding/image-sharer-ragurney.git","clone_url":"https://github.com/AppFolioOnboarding/image-sharer-ragurney.git","svn_url":"https://github.com/AppFolioOnboarding/image-sharer-ragurney","homepage":null,"size":177,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/pulls/42"},"html":{"href":"https://github.com/AppFolioOnboarding/image-sharer-ragurney/pull/42"},"issue":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/issues/42"},"comments":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-ragurney/statuses/45dc077e7f415cd40a4fbfc10f27ab0aac73f699"}}}}
{"actor":{"display_login":"rmacklin"}}