{"action":"created","issue":{"url":"https://api.github.com/repos/redding/mr/issues/236","repository_url":"https://api.github.com/repos/redding/mr","labels_url":"https://api.github.com/repos/redding/mr/issues/236/labels{/name}","comments_url":"https://api.github.com/repos/redding/mr/issues/236/comments","events_url":"https://api.github.com/repos/redding/mr/issues/236/events","html_url":"https://github.com/redding/mr/pull/236","id":160727185,"number":236,"title":"Clear after commit procs after they are called ","user":{"login":"jcredding","id":85966,"avatar_url":"https://avatars.githubusercontent.com/u/85966?v=3","gravatar_id":"","url":"https://api.github.com/users/jcredding","html_url":"https://github.com/jcredding","followers_url":"https://api.github.com/users/jcredding/followers","following_url":"https://api.github.com/users/jcredding/following{/other_user}","gists_url":"https://api.github.com/users/jcredding/gists{/gist_id}","starred_url":"https://api.github.com/users/jcredding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcredding/subscriptions","organizations_url":"https://api.github.com/users/jcredding/orgs","repos_url":"https://api.github.com/users/jcredding/repos","events_url":"https://api.github.com/users/jcredding/events{/privacy}","received_events_url":"https://api.github.com/users/jcredding/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-06-16T18:21:09Z","updated_at":"2016-06-16T21:57:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/redding/mr/pulls/236","html_url":"https://github.com/redding/mr/pull/236","diff_url":"https://github.com/redding/mr/pull/236.diff","patch_url":"https://github.com/redding/mr/pull/236.patch"},"body":"This updates the `AfterCommit` mixins to clear their after commit\r\nprocs after they call them. This avoids strange scenarios when the\r\nsame instance of a model is saved multiple times. Previously, any\r\nafter commit procs that were called would still be configured on\r\nthe instance of the model. So if the model was saved again, it\r\nwould called again. Though this could be the desired effect, its\r\nmore likely the callbacks were added as part of the original save\r\nso they shouldn't called again with the next save.\r\n\r\nThis adds a `clear_after_commit_procs` to the `RecordProcsMethods`\r\nmixin so that both the `Record` and `FakeRecord` have the method.\r\nThe method takes an optional list of callback types which allows\r\nclearing specific callback types or if no callback types are passed\r\nit will clear all of them.\r\n\r\nThis also adds a `called_after_commit_procs` method to the\r\n`RecordProcsMethods` mixin. This allows reading the procs that have\r\nbeen called. This is specifically useful for testing that an after\r\ncommit proc was added and called.\r\n\r\nFinally, this also updates the `Record` and `FakeRecord` mixins to\r\nuse the clear after commit procs method after they call their procs\r\nand store their called after commit procs.\r\n\r\n@kellyredding - Ready for review."},"comment":{"url":"https://api.github.com/repos/redding/mr/issues/comments/226625983","html_url":"https://github.com/redding/mr/pull/236#issuecomment-226625983","issue_url":"https://api.github.com/repos/redding/mr/issues/236","id":226625983,"user":{"login":"kellyredding","id":82110,"avatar_url":"https://avatars.githubusercontent.com/u/82110?v=3","gravatar_id":"","url":"https://api.github.com/users/kellyredding","html_url":"https://github.com/kellyredding","followers_url":"https://api.github.com/users/kellyredding/followers","following_url":"https://api.github.com/users/kellyredding/following{/other_user}","gists_url":"https://api.github.com/users/kellyredding/gists{/gist_id}","starred_url":"https://api.github.com/users/kellyredding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kellyredding/subscriptions","organizations_url":"https://api.github.com/users/kellyredding/orgs","repos_url":"https://api.github.com/users/kellyredding/repos","events_url":"https://api.github.com/users/kellyredding/events{/privacy}","received_events_url":"https://api.github.com/users/kellyredding/received_events","type":"User","site_admin":false},"created_at":"2016-06-16T21:57:55Z","updated_at":"2016-06-16T21:57:55Z","body":"@jcredding this looks great - I like this much better now.  One more minor comment - fix that and I'm good here 👎 "}}
{"actor":{"display_login":"kellyredding"}}