{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/25241","repository_url":"https://api.github.com/repos/rails/rails","labels_url":"https://api.github.com/repos/rails/rails/issues/25241/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/25241/comments","events_url":"https://api.github.com/repos/rails/rails/issues/25241/events","html_url":"https://github.com/rails/rails/pull/25241","id":157992407,"number":25241,"title":"Improve error message when record touch fails.","user":{"login":"aguynamedben","id":107841,"avatar_url":"https://avatars.githubusercontent.com/u/107841?v=3","gravatar_id":"","url":"https://api.github.com/users/aguynamedben","html_url":"https://github.com/aguynamedben","followers_url":"https://api.github.com/users/aguynamedben/followers","following_url":"https://api.github.com/users/aguynamedben/following{/other_user}","gists_url":"https://api.github.com/users/aguynamedben/gists{/gist_id}","starred_url":"https://api.github.com/users/aguynamedben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aguynamedben/subscriptions","organizations_url":"https://api.github.com/users/aguynamedben/orgs","repos_url":"https://api.github.com/users/aguynamedben/repos","events_url":"https://api.github.com/users/aguynamedben/events{/privacy}","received_events_url":"https://api.github.com/users/aguynamedben/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rails/rails/labels/activerecord","name":"activerecord","color":"0b02e1"}],"state":"open","locked":false,"assignee":{"login":"schneems","id":59744,"avatar_url":"https://avatars.githubusercontent.com/u/59744?v=3","gravatar_id":"","url":"https://api.github.com/users/schneems","html_url":"https://github.com/schneems","followers_url":"https://api.github.com/users/schneems/followers","following_url":"https://api.github.com/users/schneems/following{/other_user}","gists_url":"https://api.github.com/users/schneems/gists{/gist_id}","starred_url":"https://api.github.com/users/schneems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schneems/subscriptions","organizations_url":"https://api.github.com/users/schneems/orgs","repos_url":"https://api.github.com/users/schneems/repos","events_url":"https://api.github.com/users/schneems/events{/privacy}","received_events_url":"https://api.github.com/users/schneems/received_events","type":"User","site_admin":false},"assignees":[{"login":"schneems","id":59744,"avatar_url":"https://avatars.githubusercontent.com/u/59744?v=3","gravatar_id":"","url":"https://api.github.com/users/schneems","html_url":"https://github.com/schneems","followers_url":"https://api.github.com/users/schneems/followers","following_url":"https://api.github.com/users/schneems/following{/other_user}","gists_url":"https://api.github.com/users/schneems/gists{/gist_id}","starred_url":"https://api.github.com/users/schneems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schneems/subscriptions","organizations_url":"https://api.github.com/users/schneems/orgs","repos_url":"https://api.github.com/users/schneems/repos","events_url":"https://api.github.com/users/schneems/events{/privacy}","received_events_url":"https://api.github.com/users/schneems/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2016-06-01T19:52:57Z","updated_at":"2016-07-03T00:34:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/25241","html_url":"https://github.com/rails/rails/pull/25241","diff_url":"https://github.com/rails/rails/pull/25241.diff","patch_url":"https://github.com/rails/rails/pull/25241.patch"},"body":"The current error message only indicates that a touch can fail because the record is new. In practice, we saw cases where touches were failing because the record had been destroyed. `persisted?` checks `new_record?` *and* `destroyed?`. It was confusing to get a message about a new record when in reality we were destroying records.\r\n\r\nI also included a helpful tip for users to consider using `persisted?`, `new_record?`, or `destroyed?` before touching."},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/230128798","html_url":"https://github.com/rails/rails/pull/25241#issuecomment-230128798","issue_url":"https://api.github.com/repos/rails/rails/issues/25241","id":230128798,"user":{"login":"aguynamedben","id":107841,"avatar_url":"https://avatars.githubusercontent.com/u/107841?v=3","gravatar_id":"","url":"https://api.github.com/users/aguynamedben","html_url":"https://github.com/aguynamedben","followers_url":"https://api.github.com/users/aguynamedben/followers","following_url":"https://api.github.com/users/aguynamedben/following{/other_user}","gists_url":"https://api.github.com/users/aguynamedben/gists{/gist_id}","starred_url":"https://api.github.com/users/aguynamedben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aguynamedben/subscriptions","organizations_url":"https://api.github.com/users/aguynamedben/orgs","repos_url":"https://api.github.com/users/aguynamedben/repos","events_url":"https://api.github.com/users/aguynamedben/events{/privacy}","received_events_url":"https://api.github.com/users/aguynamedben/received_events","type":"User","site_admin":false},"created_at":"2016-07-03T00:34:34Z","updated_at":"2016-07-03T00:34:34Z","body":"@schneems I think this should be good to go now. Let me know if I should do anything else!"}}
{"actor":{"display_login":"aguynamedben"}}