{"action":"created","comment":{"url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/pulls/comments/78043314","id":78043314,"diff_hunk":"@@ -1,5 +1,5 @@\n class ImagesController < ApplicationController\n-  before_action :find_image, only: [:destroy, :share, :send_mail]\n+  before_action :find_image, only: [:destroy, :share, :send_mail, :update]","path":"app/controllers/images_controller.rb","position":3,"original_position":3,"commit_id":"e96c6e545e1b9494a4d803314859c48a51b17a90","original_commit_id":"e96c6e545e1b9494a4d803314859c48a51b17a90","user":{"login":"lsq921224","id":2294091,"avatar_url":"https://avatars.githubusercontent.com/u/2294091?v=3","gravatar_id":"","url":"https://api.github.com/users/lsq921224","html_url":"https://github.com/lsq921224","followers_url":"https://api.github.com/users/lsq921224/followers","following_url":"https://api.github.com/users/lsq921224/following{/other_user}","gists_url":"https://api.github.com/users/lsq921224/gists{/gist_id}","starred_url":"https://api.github.com/users/lsq921224/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsq921224/subscriptions","organizations_url":"https://api.github.com/users/lsq921224/orgs","repos_url":"https://api.github.com/users/lsq921224/repos","events_url":"https://api.github.com/users/lsq921224/events{/privacy}","received_events_url":"https://api.github.com/users/lsq921224/received_events","type":"User","site_admin":false},"body":"Well, there's a slight difference. `edit` and `show` calls `find`: \r\n`    @image = Image.find(params[:id])\r\n`\r\nbut the others call `find_by`:\r\n`    @image = Image.find_by(id: params[:id])\r\n`\r\nI use `find` for `edit` and `show` because rails will then take care of the `RecordNotFound` case for me.\r\nthe reason why I did not DRY `edit` and `show` is because if I do so, these two functions will have nothing in their body, and I think it reduces the readability. But since you mention it, I guess I will do it as well.","created_at":"2016-09-08T16:41:58Z","updated_at":"2016-09-08T16:41:58Z","html_url":"https://github.com/AppFolioOnboarding/image-sharer-lsq921224/pull/49#discussion_r78043314","pull_request_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/pulls/49","_links":{"self":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/pulls/comments/78043314"},"html":{"href":"https://github.com/AppFolioOnboarding/image-sharer-lsq921224/pull/49#discussion_r78043314"},"pull_request":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/pulls/49"}}},"pull_request":{"url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/pulls/49","id":84398235,"html_url":"https://github.com/AppFolioOnboarding/image-sharer-lsq921224/pull/49","diff_url":"https://github.com/AppFolioOnboarding/image-sharer-lsq921224/pull/49.diff","patch_url":"https://github.com/AppFolioOnboarding/image-sharer-lsq921224/pull/49.patch","issue_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/issues/49","number":49,"state":"open","locked":false,"title":"Modify tag list","user":{"login":"lsq921224","id":2294091,"avatar_url":"https://avatars.githubusercontent.com/u/2294091?v=3","gravatar_id":"","url":"https://api.github.com/users/lsq921224","html_url":"https://github.com/lsq921224","followers_url":"https://api.github.com/users/lsq921224/followers","following_url":"https://api.github.com/users/lsq921224/following{/other_user}","gists_url":"https://api.github.com/users/lsq921224/gists{/gist_id}","starred_url":"https://api.github.com/users/lsq921224/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsq921224/subscriptions","organizations_url":"https://api.github.com/users/lsq921224/orgs","repos_url":"https://api.github.com/users/lsq921224/repos","events_url":"https://api.github.com/users/lsq921224/events{/privacy}","received_events_url":"https://api.github.com/users/lsq921224/received_events","type":"User","site_admin":false},"body":"Closes #13 \r\n","created_at":"2016-09-08T00:53:06Z","updated_at":"2016-09-08T16:41:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"211db2e53afcf7279aa047fff8f13875e9972269","assignee":{"login":"weixing2014","id":3695917,"avatar_url":"https://avatars.githubusercontent.com/u/3695917?v=3","gravatar_id":"","url":"https://api.github.com/users/weixing2014","html_url":"https://github.com/weixing2014","followers_url":"https://api.github.com/users/weixing2014/followers","following_url":"https://api.github.com/users/weixing2014/following{/other_user}","gists_url":"https://api.github.com/users/weixing2014/gists{/gist_id}","starred_url":"https://api.github.com/users/weixing2014/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weixing2014/subscriptions","organizations_url":"https://api.github.com/users/weixing2014/orgs","repos_url":"https://api.github.com/users/weixing2014/repos","events_url":"https://api.github.com/users/weixing2014/events{/privacy}","received_events_url":"https://api.github.com/users/weixing2014/received_events","type":"User","site_admin":false},"assignees":[{"login":"weixing2014","id":3695917,"avatar_url":"https://avatars.githubusercontent.com/u/3695917?v=3","gravatar_id":"","url":"https://api.github.com/users/weixing2014","html_url":"https://github.com/weixing2014","followers_url":"https://api.github.com/users/weixing2014/followers","following_url":"https://api.github.com/users/weixing2014/following{/other_user}","gists_url":"https://api.github.com/users/weixing2014/gists{/gist_id}","starred_url":"https://api.github.com/users/weixing2014/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weixing2014/subscriptions","organizations_url":"https://api.github.com/users/weixing2014/orgs","repos_url":"https://api.github.com/users/weixing2014/repos","events_url":"https://api.github.com/users/weixing2014/events{/privacy}","received_events_url":"https://api.github.com/users/weixing2014/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/pulls/49/commits","review_comments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/pulls/49/comments","review_comment_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/issues/49/comments","statuses_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/statuses/e96c6e545e1b9494a4d803314859c48a51b17a90","head":{"label":"AppFolioOnboarding:modify_tag_list","ref":"modify_tag_list","sha":"e96c6e545e1b9494a4d803314859c48a51b17a90","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":63720294,"name":"image-sharer-lsq921224","full_name":"AppFolioOnboarding/image-sharer-lsq921224","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-lsq921224","description":"image-sharer-lsq921224 created by GitHub Classroom","fork":false,"url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224","forks_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/forks","keys_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/teams","hooks_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/hooks","issue_events_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/issues/events{/number}","events_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/events","assignees_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/assignees{/user}","branches_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/branches{/branch}","tags_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/tags","blobs_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/git/refs{/sha}","trees_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/statuses/{sha}","languages_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/languages","stargazers_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/stargazers","contributors_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/contributors","subscribers_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/subscribers","subscription_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/subscription","commits_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/commits{/sha}","git_commits_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/git/commits{/sha}","comments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/comments{/number}","issue_comment_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/issues/comments{/number}","contents_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/contents/{+path}","compare_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/merges","archive_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/downloads","issues_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/issues{/number}","pulls_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/pulls{/number}","milestones_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/milestones{/number}","notifications_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/labels{/name}","releases_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/releases{/id}","deployments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/deployments","created_at":"2016-07-19T18:59:02Z","updated_at":"2016-07-19T18:59:35Z","pushed_at":"2016-09-08T01:29:32Z","git_url":"git://github.com/AppFolioOnboarding/image-sharer-lsq921224.git","ssh_url":"git@github.com:AppFolioOnboarding/image-sharer-lsq921224.git","clone_url":"https://github.com/AppFolioOnboarding/image-sharer-lsq921224.git","svn_url":"https://github.com/AppFolioOnboarding/image-sharer-lsq921224","homepage":null,"size":171,"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":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"AppFolioOnboarding:master","ref":"master","sha":"8137b037ddc7bbd9d11e1436b18bb0dc9b1d3e2b","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":63720294,"name":"image-sharer-lsq921224","full_name":"AppFolioOnboarding/image-sharer-lsq921224","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-lsq921224","description":"image-sharer-lsq921224 created by GitHub Classroom","fork":false,"url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224","forks_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/forks","keys_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/teams","hooks_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/hooks","issue_events_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/issues/events{/number}","events_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/events","assignees_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/assignees{/user}","branches_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/branches{/branch}","tags_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/tags","blobs_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/git/refs{/sha}","trees_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/statuses/{sha}","languages_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/languages","stargazers_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/stargazers","contributors_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/contributors","subscribers_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/subscribers","subscription_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/subscription","commits_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/commits{/sha}","git_commits_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/git/commits{/sha}","comments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/comments{/number}","issue_comment_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/issues/comments{/number}","contents_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/contents/{+path}","compare_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/merges","archive_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/downloads","issues_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/issues{/number}","pulls_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/pulls{/number}","milestones_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/milestones{/number}","notifications_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/labels{/name}","releases_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/releases{/id}","deployments_url":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/deployments","created_at":"2016-07-19T18:59:02Z","updated_at":"2016-07-19T18:59:35Z","pushed_at":"2016-09-08T01:29:32Z","git_url":"git://github.com/AppFolioOnboarding/image-sharer-lsq921224.git","ssh_url":"git@github.com:AppFolioOnboarding/image-sharer-lsq921224.git","clone_url":"https://github.com/AppFolioOnboarding/image-sharer-lsq921224.git","svn_url":"https://github.com/AppFolioOnboarding/image-sharer-lsq921224","homepage":null,"size":171,"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":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/pulls/49"},"html":{"href":"https://github.com/AppFolioOnboarding/image-sharer-lsq921224/pull/49"},"issue":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/issues/49"},"comments":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/AppFolioOnboarding/image-sharer-lsq921224/statuses/e96c6e545e1b9494a4d803314859c48a51b17a90"}}}}
{"actor":{"display_login":"lsq921224"}}