{"action":"created","comment":{"url":"https://api.github.com/repos/ffquint/inventory-to-go/pulls/comments/50918678","id":50918678,"diff_hunk":"@@ -18,6 +18,14 @@ def create\n   end\n \n   def update\n+    @item = Item.find(params[:id])\n+    @item.update_attributes(item_params)","path":"app/controllers/items_controller.rb","position":14,"original_position":14,"commit_id":"74f79cd5a806e40b667317f02aee24a13911ed13","original_commit_id":"74f79cd5a806e40b667317f02aee24a13911ed13","user":{"login":"droberts84","id":4960334,"avatar_url":"https://avatars.githubusercontent.com/u/4960334?v=3","gravatar_id":"","url":"https://api.github.com/users/droberts84","html_url":"https://github.com/droberts84","followers_url":"https://api.github.com/users/droberts84/followers","following_url":"https://api.github.com/users/droberts84/following{/other_user}","gists_url":"https://api.github.com/users/droberts84/gists{/gist_id}","starred_url":"https://api.github.com/users/droberts84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/droberts84/subscriptions","organizations_url":"https://api.github.com/users/droberts84/orgs","repos_url":"https://api.github.com/users/droberts84/repos","events_url":"https://api.github.com/users/droberts84/events{/privacy}","received_events_url":"https://api.github.com/users/droberts84/received_events","type":"User","site_admin":false},"body":"`update_attributes` will save to the database, which is probably not your intention since you're saving on line 24.  You can either use this on line 24 instead of `save` OR use [assign_attributes](http://devdocs.io/rails/activerecord/attributeassignment#method-i-assign_attributes) which is probably what you intended for this line to do.","created_at":"2016-01-26T23:25:28Z","updated_at":"2016-01-26T23:25:28Z","html_url":"https://github.com/ffquint/inventory-to-go/pull/37#discussion_r50918678","pull_request_url":"https://api.github.com/repos/ffquint/inventory-to-go/pulls/37","_links":{"self":{"href":"https://api.github.com/repos/ffquint/inventory-to-go/pulls/comments/50918678"},"html":{"href":"https://github.com/ffquint/inventory-to-go/pull/37#discussion_r50918678"},"pull_request":{"href":"https://api.github.com/repos/ffquint/inventory-to-go/pulls/37"}}},"pull_request":{"url":"https://api.github.com/repos/ffquint/inventory-to-go/pulls/37","id":57277751,"html_url":"https://github.com/ffquint/inventory-to-go/pull/37","diff_url":"https://github.com/ffquint/inventory-to-go/pull/37.diff","patch_url":"https://github.com/ffquint/inventory-to-go/pull/37.patch","issue_url":"https://api.github.com/repos/ffquint/inventory-to-go/issues/37","number":37,"state":"open","locked":false,"title":"Write Item Update Action (TDD + controller code)","user":{"login":"ffquint","id":14365305,"avatar_url":"https://avatars.githubusercontent.com/u/14365305?v=3","gravatar_id":"","url":"https://api.github.com/users/ffquint","html_url":"https://github.com/ffquint","followers_url":"https://api.github.com/users/ffquint/followers","following_url":"https://api.github.com/users/ffquint/following{/other_user}","gists_url":"https://api.github.com/users/ffquint/gists{/gist_id}","starred_url":"https://api.github.com/users/ffquint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffquint/subscriptions","organizations_url":"https://api.github.com/users/ffquint/orgs","repos_url":"https://api.github.com/users/ffquint/repos","events_url":"https://api.github.com/users/ffquint/events{/privacy}","received_events_url":"https://api.github.com/users/ffquint/received_events","type":"User","site_admin":false},"body":"Wrote spec tests for item update action: passed. Wrote code for update action in controller. Minor code changes to department controller spec.\r\n@droberts84 ","created_at":"2016-01-26T21:47:01Z","updated_at":"2016-01-26T23:25:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c83aead1734163f171ab040cb9af1b22b620c9e9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ffquint/inventory-to-go/pulls/37/commits","review_comments_url":"https://api.github.com/repos/ffquint/inventory-to-go/pulls/37/comments","review_comment_url":"https://api.github.com/repos/ffquint/inventory-to-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ffquint/inventory-to-go/issues/37/comments","statuses_url":"https://api.github.com/repos/ffquint/inventory-to-go/statuses/74f79cd5a806e40b667317f02aee24a13911ed13","head":{"label":"ffquint:write-item-update-action","ref":"write-item-update-action","sha":"74f79cd5a806e40b667317f02aee24a13911ed13","user":{"login":"ffquint","id":14365305,"avatar_url":"https://avatars.githubusercontent.com/u/14365305?v=3","gravatar_id":"","url":"https://api.github.com/users/ffquint","html_url":"https://github.com/ffquint","followers_url":"https://api.github.com/users/ffquint/followers","following_url":"https://api.github.com/users/ffquint/following{/other_user}","gists_url":"https://api.github.com/users/ffquint/gists{/gist_id}","starred_url":"https://api.github.com/users/ffquint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffquint/subscriptions","organizations_url":"https://api.github.com/users/ffquint/orgs","repos_url":"https://api.github.com/users/ffquint/repos","events_url":"https://api.github.com/users/ffquint/events{/privacy}","received_events_url":"https://api.github.com/users/ffquint/received_events","type":"User","site_admin":false},"repo":{"id":49910306,"name":"inventory-to-go","full_name":"ffquint/inventory-to-go","owner":{"login":"ffquint","id":14365305,"avatar_url":"https://avatars.githubusercontent.com/u/14365305?v=3","gravatar_id":"","url":"https://api.github.com/users/ffquint","html_url":"https://github.com/ffquint","followers_url":"https://api.github.com/users/ffquint/followers","following_url":"https://api.github.com/users/ffquint/following{/other_user}","gists_url":"https://api.github.com/users/ffquint/gists{/gist_id}","starred_url":"https://api.github.com/users/ffquint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffquint/subscriptions","organizations_url":"https://api.github.com/users/ffquint/orgs","repos_url":"https://api.github.com/users/ffquint/repos","events_url":"https://api.github.com/users/ffquint/events{/privacy}","received_events_url":"https://api.github.com/users/ffquint/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ffquint/inventory-to-go","description":"","fork":false,"url":"https://api.github.com/repos/ffquint/inventory-to-go","forks_url":"https://api.github.com/repos/ffquint/inventory-to-go/forks","keys_url":"https://api.github.com/repos/ffquint/inventory-to-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ffquint/inventory-to-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ffquint/inventory-to-go/teams","hooks_url":"https://api.github.com/repos/ffquint/inventory-to-go/hooks","issue_events_url":"https://api.github.com/repos/ffquint/inventory-to-go/issues/events{/number}","events_url":"https://api.github.com/repos/ffquint/inventory-to-go/events","assignees_url":"https://api.github.com/repos/ffquint/inventory-to-go/assignees{/user}","branches_url":"https://api.github.com/repos/ffquint/inventory-to-go/branches{/branch}","tags_url":"https://api.github.com/repos/ffquint/inventory-to-go/tags","blobs_url":"https://api.github.com/repos/ffquint/inventory-to-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ffquint/inventory-to-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ffquint/inventory-to-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/ffquint/inventory-to-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ffquint/inventory-to-go/statuses/{sha}","languages_url":"https://api.github.com/repos/ffquint/inventory-to-go/languages","stargazers_url":"https://api.github.com/repos/ffquint/inventory-to-go/stargazers","contributors_url":"https://api.github.com/repos/ffquint/inventory-to-go/contributors","subscribers_url":"https://api.github.com/repos/ffquint/inventory-to-go/subscribers","subscription_url":"https://api.github.com/repos/ffquint/inventory-to-go/subscription","commits_url":"https://api.github.com/repos/ffquint/inventory-to-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/ffquint/inventory-to-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/ffquint/inventory-to-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/ffquint/inventory-to-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/ffquint/inventory-to-go/contents/{+path}","compare_url":"https://api.github.com/repos/ffquint/inventory-to-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ffquint/inventory-to-go/merges","archive_url":"https://api.github.com/repos/ffquint/inventory-to-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ffquint/inventory-to-go/downloads","issues_url":"https://api.github.com/repos/ffquint/inventory-to-go/issues{/number}","pulls_url":"https://api.github.com/repos/ffquint/inventory-to-go/pulls{/number}","milestones_url":"https://api.github.com/repos/ffquint/inventory-to-go/milestones{/number}","notifications_url":"https://api.github.com/repos/ffquint/inventory-to-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ffquint/inventory-to-go/labels{/name}","releases_url":"https://api.github.com/repos/ffquint/inventory-to-go/releases{/id}","deployments_url":"https://api.github.com/repos/ffquint/inventory-to-go/deployments","created_at":"2016-01-18T22:42:20Z","updated_at":"2016-01-21T04:10:31Z","pushed_at":"2016-01-26T22:00:02Z","git_url":"git://github.com/ffquint/inventory-to-go.git","ssh_url":"git@github.com:ffquint/inventory-to-go.git","clone_url":"https://github.com/ffquint/inventory-to-go.git","svn_url":"https://github.com/ffquint/inventory-to-go","homepage":null,"size":48,"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":14,"forks":0,"open_issues":14,"watchers":0,"default_branch":"master"}},"base":{"label":"ffquint:master","ref":"master","sha":"ffd384884fd16241057da84a488ecef46e42c205","user":{"login":"ffquint","id":14365305,"avatar_url":"https://avatars.githubusercontent.com/u/14365305?v=3","gravatar_id":"","url":"https://api.github.com/users/ffquint","html_url":"https://github.com/ffquint","followers_url":"https://api.github.com/users/ffquint/followers","following_url":"https://api.github.com/users/ffquint/following{/other_user}","gists_url":"https://api.github.com/users/ffquint/gists{/gist_id}","starred_url":"https://api.github.com/users/ffquint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffquint/subscriptions","organizations_url":"https://api.github.com/users/ffquint/orgs","repos_url":"https://api.github.com/users/ffquint/repos","events_url":"https://api.github.com/users/ffquint/events{/privacy}","received_events_url":"https://api.github.com/users/ffquint/received_events","type":"User","site_admin":false},"repo":{"id":49910306,"name":"inventory-to-go","full_name":"ffquint/inventory-to-go","owner":{"login":"ffquint","id":14365305,"avatar_url":"https://avatars.githubusercontent.com/u/14365305?v=3","gravatar_id":"","url":"https://api.github.com/users/ffquint","html_url":"https://github.com/ffquint","followers_url":"https://api.github.com/users/ffquint/followers","following_url":"https://api.github.com/users/ffquint/following{/other_user}","gists_url":"https://api.github.com/users/ffquint/gists{/gist_id}","starred_url":"https://api.github.com/users/ffquint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffquint/subscriptions","organizations_url":"https://api.github.com/users/ffquint/orgs","repos_url":"https://api.github.com/users/ffquint/repos","events_url":"https://api.github.com/users/ffquint/events{/privacy}","received_events_url":"https://api.github.com/users/ffquint/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ffquint/inventory-to-go","description":"","fork":false,"url":"https://api.github.com/repos/ffquint/inventory-to-go","forks_url":"https://api.github.com/repos/ffquint/inventory-to-go/forks","keys_url":"https://api.github.com/repos/ffquint/inventory-to-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ffquint/inventory-to-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ffquint/inventory-to-go/teams","hooks_url":"https://api.github.com/repos/ffquint/inventory-to-go/hooks","issue_events_url":"https://api.github.com/repos/ffquint/inventory-to-go/issues/events{/number}","events_url":"https://api.github.com/repos/ffquint/inventory-to-go/events","assignees_url":"https://api.github.com/repos/ffquint/inventory-to-go/assignees{/user}","branches_url":"https://api.github.com/repos/ffquint/inventory-to-go/branches{/branch}","tags_url":"https://api.github.com/repos/ffquint/inventory-to-go/tags","blobs_url":"https://api.github.com/repos/ffquint/inventory-to-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ffquint/inventory-to-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ffquint/inventory-to-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/ffquint/inventory-to-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ffquint/inventory-to-go/statuses/{sha}","languages_url":"https://api.github.com/repos/ffquint/inventory-to-go/languages","stargazers_url":"https://api.github.com/repos/ffquint/inventory-to-go/stargazers","contributors_url":"https://api.github.com/repos/ffquint/inventory-to-go/contributors","subscribers_url":"https://api.github.com/repos/ffquint/inventory-to-go/subscribers","subscription_url":"https://api.github.com/repos/ffquint/inventory-to-go/subscription","commits_url":"https://api.github.com/repos/ffquint/inventory-to-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/ffquint/inventory-to-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/ffquint/inventory-to-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/ffquint/inventory-to-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/ffquint/inventory-to-go/contents/{+path}","compare_url":"https://api.github.com/repos/ffquint/inventory-to-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ffquint/inventory-to-go/merges","archive_url":"https://api.github.com/repos/ffquint/inventory-to-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ffquint/inventory-to-go/downloads","issues_url":"https://api.github.com/repos/ffquint/inventory-to-go/issues{/number}","pulls_url":"https://api.github.com/repos/ffquint/inventory-to-go/pulls{/number}","milestones_url":"https://api.github.com/repos/ffquint/inventory-to-go/milestones{/number}","notifications_url":"https://api.github.com/repos/ffquint/inventory-to-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ffquint/inventory-to-go/labels{/name}","releases_url":"https://api.github.com/repos/ffquint/inventory-to-go/releases{/id}","deployments_url":"https://api.github.com/repos/ffquint/inventory-to-go/deployments","created_at":"2016-01-18T22:42:20Z","updated_at":"2016-01-21T04:10:31Z","pushed_at":"2016-01-26T22:00:02Z","git_url":"git://github.com/ffquint/inventory-to-go.git","ssh_url":"git@github.com:ffquint/inventory-to-go.git","clone_url":"https://github.com/ffquint/inventory-to-go.git","svn_url":"https://github.com/ffquint/inventory-to-go","homepage":null,"size":48,"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":14,"forks":0,"open_issues":14,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ffquint/inventory-to-go/pulls/37"},"html":{"href":"https://github.com/ffquint/inventory-to-go/pull/37"},"issue":{"href":"https://api.github.com/repos/ffquint/inventory-to-go/issues/37"},"comments":{"href":"https://api.github.com/repos/ffquint/inventory-to-go/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/ffquint/inventory-to-go/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/ffquint/inventory-to-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ffquint/inventory-to-go/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/ffquint/inventory-to-go/statuses/74f79cd5a806e40b667317f02aee24a13911ed13"}}}}