{"action":"created","comment":{"url":"https://api.github.com/repos/Fgyter/my_app/pulls/comments/232160794","pull_request_review_id":173296116,"id":232160794,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjE2MDc5NA==","diff_hunk":"@@ -40,32 +41,39 @@ def create\n     redirect_to photos_path\n   end\n \n-  def update \n-      if @photo.update(photo_params)\n-        redirect_to @photo, notice: 'Фото обновлено'\n-      else\n-        render :edit\n+  def update\n+   # binding.pry\n+    state = params[:state]\n+    if state\n+      if state == \"work\" \n+        @photo.to_work!\n       end\n+      redirect_to @photo\n+    elsif @photo.update(photo_params)\n+      redirect_to @photo, notice: 'Photo update'\n+    else\n+      render :edit\n+    end\n   end\n \n   def destroy \n     if @photo.destroy\n-      redirect_to photos_path, notice: 'Фото удалено' \n+      redirect_to photos_path, notice: 'Photo delete' ","path":"app/controllers/photos_controller.rb","position":47,"original_position":47,"commit_id":"b1ba7720daf4ed3da0c48e55286cec79f528977c","original_commit_id":"b1ba7720daf4ed3da0c48e55286cec79f528977c","user":{"login":"reshetov","id":1003798,"node_id":"MDQ6VXNlcjEwMDM3OTg=","avatar_url":"https://avatars3.githubusercontent.com/u/1003798?v=4","gravatar_id":"","url":"https://api.github.com/users/reshetov","html_url":"https://github.com/reshetov","followers_url":"https://api.github.com/users/reshetov/followers","following_url":"https://api.github.com/users/reshetov/following{/other_user}","gists_url":"https://api.github.com/users/reshetov/gists{/gist_id}","starred_url":"https://api.github.com/users/reshetov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reshetov/subscriptions","organizations_url":"https://api.github.com/users/reshetov/orgs","repos_url":"https://api.github.com/users/reshetov/repos","events_url":"https://api.github.com/users/reshetov/events{/privacy}","received_events_url":"https://api.github.com/users/reshetov/received_events","type":"User","site_admin":false},"body":"В локаль","created_at":"2018-11-09T07:25:02Z","updated_at":"2018-11-09T07:29:14Z","html_url":"https://github.com/Fgyter/my_app/pull/6#discussion_r232160794","pull_request_url":"https://api.github.com/repos/Fgyter/my_app/pulls/6","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Fgyter/my_app/pulls/comments/232160794"},"html":{"href":"https://github.com/Fgyter/my_app/pull/6#discussion_r232160794"},"pull_request":{"href":"https://api.github.com/repos/Fgyter/my_app/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/Fgyter/my_app/pulls/6","id":228936871,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4OTM2ODcx","html_url":"https://github.com/Fgyter/my_app/pull/6","diff_url":"https://github.com/Fgyter/my_app/pull/6.diff","patch_url":"https://github.com/Fgyter/my_app/pull/6.patch","issue_url":"https://api.github.com/repos/Fgyter/my_app/issues/6","number":6,"state":"open","locked":false,"title":"Order","user":{"login":"Fgyter","id":42553016,"node_id":"MDQ6VXNlcjQyNTUzMDE2","avatar_url":"https://avatars3.githubusercontent.com/u/42553016?v=4","gravatar_id":"","url":"https://api.github.com/users/Fgyter","html_url":"https://github.com/Fgyter","followers_url":"https://api.github.com/users/Fgyter/followers","following_url":"https://api.github.com/users/Fgyter/following{/other_user}","gists_url":"https://api.github.com/users/Fgyter/gists{/gist_id}","starred_url":"https://api.github.com/users/Fgyter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fgyter/subscriptions","organizations_url":"https://api.github.com/users/Fgyter/orgs","repos_url":"https://api.github.com/users/Fgyter/repos","events_url":"https://api.github.com/users/Fgyter/events{/privacy}","received_events_url":"https://api.github.com/users/Fgyter/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-07T07:16:00Z","updated_at":"2018-11-09T07:29:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6b10465c924c387b607817e4585018fd5d9e9e89","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Fgyter/my_app/pulls/6/commits","review_comments_url":"https://api.github.com/repos/Fgyter/my_app/pulls/6/comments","review_comment_url":"https://api.github.com/repos/Fgyter/my_app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Fgyter/my_app/issues/6/comments","statuses_url":"https://api.github.com/repos/Fgyter/my_app/statuses/b1ba7720daf4ed3da0c48e55286cec79f528977c","head":{"label":"Fgyter:order","ref":"order","sha":"b1ba7720daf4ed3da0c48e55286cec79f528977c","user":{"login":"Fgyter","id":42553016,"node_id":"MDQ6VXNlcjQyNTUzMDE2","avatar_url":"https://avatars3.githubusercontent.com/u/42553016?v=4","gravatar_id":"","url":"https://api.github.com/users/Fgyter","html_url":"https://github.com/Fgyter","followers_url":"https://api.github.com/users/Fgyter/followers","following_url":"https://api.github.com/users/Fgyter/following{/other_user}","gists_url":"https://api.github.com/users/Fgyter/gists{/gist_id}","starred_url":"https://api.github.com/users/Fgyter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fgyter/subscriptions","organizations_url":"https://api.github.com/users/Fgyter/orgs","repos_url":"https://api.github.com/users/Fgyter/repos","events_url":"https://api.github.com/users/Fgyter/events{/privacy}","received_events_url":"https://api.github.com/users/Fgyter/received_events","type":"User","site_admin":false},"repo":{"id":148348914,"node_id":"MDEwOlJlcG9zaXRvcnkxNDgzNDg5MTQ=","name":"my_app","full_name":"Fgyter/my_app","private":false,"owner":{"login":"Fgyter","id":42553016,"node_id":"MDQ6VXNlcjQyNTUzMDE2","avatar_url":"https://avatars3.githubusercontent.com/u/42553016?v=4","gravatar_id":"","url":"https://api.github.com/users/Fgyter","html_url":"https://github.com/Fgyter","followers_url":"https://api.github.com/users/Fgyter/followers","following_url":"https://api.github.com/users/Fgyter/following{/other_user}","gists_url":"https://api.github.com/users/Fgyter/gists{/gist_id}","starred_url":"https://api.github.com/users/Fgyter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fgyter/subscriptions","organizations_url":"https://api.github.com/users/Fgyter/orgs","repos_url":"https://api.github.com/users/Fgyter/repos","events_url":"https://api.github.com/users/Fgyter/events{/privacy}","received_events_url":"https://api.github.com/users/Fgyter/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Fgyter/my_app","description":"приложение на Rails v5.2.1 \"Художник\"","fork":false,"url":"https://api.github.com/repos/Fgyter/my_app","forks_url":"https://api.github.com/repos/Fgyter/my_app/forks","keys_url":"https://api.github.com/repos/Fgyter/my_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Fgyter/my_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Fgyter/my_app/teams","hooks_url":"https://api.github.com/repos/Fgyter/my_app/hooks","issue_events_url":"https://api.github.com/repos/Fgyter/my_app/issues/events{/number}","events_url":"https://api.github.com/repos/Fgyter/my_app/events","assignees_url":"https://api.github.com/repos/Fgyter/my_app/assignees{/user}","branches_url":"https://api.github.com/repos/Fgyter/my_app/branches{/branch}","tags_url":"https://api.github.com/repos/Fgyter/my_app/tags","blobs_url":"https://api.github.com/repos/Fgyter/my_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Fgyter/my_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Fgyter/my_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/Fgyter/my_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Fgyter/my_app/statuses/{sha}","languages_url":"https://api.github.com/repos/Fgyter/my_app/languages","stargazers_url":"https://api.github.com/repos/Fgyter/my_app/stargazers","contributors_url":"https://api.github.com/repos/Fgyter/my_app/contributors","subscribers_url":"https://api.github.com/repos/Fgyter/my_app/subscribers","subscription_url":"https://api.github.com/repos/Fgyter/my_app/subscription","commits_url":"https://api.github.com/repos/Fgyter/my_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/Fgyter/my_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/Fgyter/my_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/Fgyter/my_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/Fgyter/my_app/contents/{+path}","compare_url":"https://api.github.com/repos/Fgyter/my_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Fgyter/my_app/merges","archive_url":"https://api.github.com/repos/Fgyter/my_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Fgyter/my_app/downloads","issues_url":"https://api.github.com/repos/Fgyter/my_app/issues{/number}","pulls_url":"https://api.github.com/repos/Fgyter/my_app/pulls{/number}","milestones_url":"https://api.github.com/repos/Fgyter/my_app/milestones{/number}","notifications_url":"https://api.github.com/repos/Fgyter/my_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Fgyter/my_app/labels{/name}","releases_url":"https://api.github.com/repos/Fgyter/my_app/releases{/id}","deployments_url":"https://api.github.com/repos/Fgyter/my_app/deployments","created_at":"2018-09-11T16:44:55Z","updated_at":"2018-11-01T13:32:44Z","pushed_at":"2018-11-08T15:22:51Z","git_url":"git://github.com/Fgyter/my_app.git","ssh_url":"git@github.com:Fgyter/my_app.git","clone_url":"https://github.com/Fgyter/my_app.git","svn_url":"https://github.com/Fgyter/my_app","homepage":"","size":7305,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"Fgyter:master","ref":"master","sha":"9faa83e477659a57eb7a3b3360bb3bb754532aaf","user":{"login":"Fgyter","id":42553016,"node_id":"MDQ6VXNlcjQyNTUzMDE2","avatar_url":"https://avatars3.githubusercontent.com/u/42553016?v=4","gravatar_id":"","url":"https://api.github.com/users/Fgyter","html_url":"https://github.com/Fgyter","followers_url":"https://api.github.com/users/Fgyter/followers","following_url":"https://api.github.com/users/Fgyter/following{/other_user}","gists_url":"https://api.github.com/users/Fgyter/gists{/gist_id}","starred_url":"https://api.github.com/users/Fgyter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fgyter/subscriptions","organizations_url":"https://api.github.com/users/Fgyter/orgs","repos_url":"https://api.github.com/users/Fgyter/repos","events_url":"https://api.github.com/users/Fgyter/events{/privacy}","received_events_url":"https://api.github.com/users/Fgyter/received_events","type":"User","site_admin":false},"repo":{"id":148348914,"node_id":"MDEwOlJlcG9zaXRvcnkxNDgzNDg5MTQ=","name":"my_app","full_name":"Fgyter/my_app","private":false,"owner":{"login":"Fgyter","id":42553016,"node_id":"MDQ6VXNlcjQyNTUzMDE2","avatar_url":"https://avatars3.githubusercontent.com/u/42553016?v=4","gravatar_id":"","url":"https://api.github.com/users/Fgyter","html_url":"https://github.com/Fgyter","followers_url":"https://api.github.com/users/Fgyter/followers","following_url":"https://api.github.com/users/Fgyter/following{/other_user}","gists_url":"https://api.github.com/users/Fgyter/gists{/gist_id}","starred_url":"https://api.github.com/users/Fgyter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fgyter/subscriptions","organizations_url":"https://api.github.com/users/Fgyter/orgs","repos_url":"https://api.github.com/users/Fgyter/repos","events_url":"https://api.github.com/users/Fgyter/events{/privacy}","received_events_url":"https://api.github.com/users/Fgyter/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Fgyter/my_app","description":"приложение на Rails v5.2.1 \"Художник\"","fork":false,"url":"https://api.github.com/repos/Fgyter/my_app","forks_url":"https://api.github.com/repos/Fgyter/my_app/forks","keys_url":"https://api.github.com/repos/Fgyter/my_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Fgyter/my_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Fgyter/my_app/teams","hooks_url":"https://api.github.com/repos/Fgyter/my_app/hooks","issue_events_url":"https://api.github.com/repos/Fgyter/my_app/issues/events{/number}","events_url":"https://api.github.com/repos/Fgyter/my_app/events","assignees_url":"https://api.github.com/repos/Fgyter/my_app/assignees{/user}","branches_url":"https://api.github.com/repos/Fgyter/my_app/branches{/branch}","tags_url":"https://api.github.com/repos/Fgyter/my_app/tags","blobs_url":"https://api.github.com/repos/Fgyter/my_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Fgyter/my_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Fgyter/my_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/Fgyter/my_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Fgyter/my_app/statuses/{sha}","languages_url":"https://api.github.com/repos/Fgyter/my_app/languages","stargazers_url":"https://api.github.com/repos/Fgyter/my_app/stargazers","contributors_url":"https://api.github.com/repos/Fgyter/my_app/contributors","subscribers_url":"https://api.github.com/repos/Fgyter/my_app/subscribers","subscription_url":"https://api.github.com/repos/Fgyter/my_app/subscription","commits_url":"https://api.github.com/repos/Fgyter/my_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/Fgyter/my_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/Fgyter/my_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/Fgyter/my_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/Fgyter/my_app/contents/{+path}","compare_url":"https://api.github.com/repos/Fgyter/my_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Fgyter/my_app/merges","archive_url":"https://api.github.com/repos/Fgyter/my_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Fgyter/my_app/downloads","issues_url":"https://api.github.com/repos/Fgyter/my_app/issues{/number}","pulls_url":"https://api.github.com/repos/Fgyter/my_app/pulls{/number}","milestones_url":"https://api.github.com/repos/Fgyter/my_app/milestones{/number}","notifications_url":"https://api.github.com/repos/Fgyter/my_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Fgyter/my_app/labels{/name}","releases_url":"https://api.github.com/repos/Fgyter/my_app/releases{/id}","deployments_url":"https://api.github.com/repos/Fgyter/my_app/deployments","created_at":"2018-09-11T16:44:55Z","updated_at":"2018-11-01T13:32:44Z","pushed_at":"2018-11-08T15:22:51Z","git_url":"git://github.com/Fgyter/my_app.git","ssh_url":"git@github.com:Fgyter/my_app.git","clone_url":"https://github.com/Fgyter/my_app.git","svn_url":"https://github.com/Fgyter/my_app","homepage":"","size":7305,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Fgyter/my_app/pulls/6"},"html":{"href":"https://github.com/Fgyter/my_app/pull/6"},"issue":{"href":"https://api.github.com/repos/Fgyter/my_app/issues/6"},"comments":{"href":"https://api.github.com/repos/Fgyter/my_app/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/Fgyter/my_app/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/Fgyter/my_app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Fgyter/my_app/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/Fgyter/my_app/statuses/b1ba7720daf4ed3da0c48e55286cec79f528977c"}},"author_association":"OWNER"}}
{"actor":{"display_login":"reshetov"}}