{"action":"opened","number":298,"pull_request":{"url":"https://api.github.com/repos/aasm/aasm/pulls/298","id":54575140,"html_url":"https://github.com/aasm/aasm/pull/298","diff_url":"https://github.com/aasm/aasm/pull/298.diff","patch_url":"https://github.com/aasm/aasm/pull/298.patch","issue_url":"https://api.github.com/repos/aasm/aasm/issues/298","number":298,"state":"open","locked":false,"title":"Delegate Event After_Commit Callbacks When Using ActiveRecord","user":{"login":"rringler","id":1390064,"avatar_url":"https://avatars.githubusercontent.com/u/1390064?v=3","gravatar_id":"","url":"https://api.github.com/users/rringler","html_url":"https://github.com/rringler","followers_url":"https://api.github.com/users/rringler/followers","following_url":"https://api.github.com/users/rringler/following{/other_user}","gists_url":"https://api.github.com/users/rringler/gists{/gist_id}","starred_url":"https://api.github.com/users/rringler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rringler/subscriptions","organizations_url":"https://api.github.com/users/rringler/orgs","repos_url":"https://api.github.com/users/rringler/repos","events_url":"https://api.github.com/users/rringler/events{/privacy}","received_events_url":"https://api.github.com/users/rringler/received_events","type":"User","site_admin":false},"body":"This PR reimplements @hjdivad's [patch](https://github.com/aasm/aasm/pull/170) delegating event `after_commit` callbacks \r\nwhen using ActiveRecord.  This allows the `after_commit` callbacks to be fired \r\nboth when the record is persisted immediately (eg., via `#event!` methods) as  well \r\nas when the record is persisted manually (eg., via the `#event` method, followed by \r\na `#save`.)  It also preserves the order of `after_commit` callbacks in the case of \r\nmultiple state transitions.\r\n\r\nThis (patched) behavior is  more  consistent with how ActiveRecord handles \r\n`after_commit` callbacks.","created_at":"2015-12-25T05:43:37Z","updated_at":"2015-12-25T05:43:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aasm/aasm/pulls/298/commits","review_comments_url":"https://api.github.com/repos/aasm/aasm/pulls/298/comments","review_comment_url":"https://api.github.com/repos/aasm/aasm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aasm/aasm/issues/298/comments","statuses_url":"https://api.github.com/repos/aasm/aasm/statuses/86ac95537b5f162c3df3ea2dabcd8fd98c7d8f25","head":{"label":"shuddle:feature/delegate-event-after-commit","ref":"feature/delegate-event-after-commit","sha":"86ac95537b5f162c3df3ea2dabcd8fd98c7d8f25","user":{"login":"shuddle","id":6970671,"avatar_url":"https://avatars.githubusercontent.com/u/6970671?v=3","gravatar_id":"","url":"https://api.github.com/users/shuddle","html_url":"https://github.com/shuddle","followers_url":"https://api.github.com/users/shuddle/followers","following_url":"https://api.github.com/users/shuddle/following{/other_user}","gists_url":"https://api.github.com/users/shuddle/gists{/gist_id}","starred_url":"https://api.github.com/users/shuddle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shuddle/subscriptions","organizations_url":"https://api.github.com/users/shuddle/orgs","repos_url":"https://api.github.com/users/shuddle/repos","events_url":"https://api.github.com/users/shuddle/events{/privacy}","received_events_url":"https://api.github.com/users/shuddle/received_events","type":"Organization","site_admin":false},"repo":{"id":46002686,"name":"aasm","full_name":"shuddle/aasm","owner":{"login":"shuddle","id":6970671,"avatar_url":"https://avatars.githubusercontent.com/u/6970671?v=3","gravatar_id":"","url":"https://api.github.com/users/shuddle","html_url":"https://github.com/shuddle","followers_url":"https://api.github.com/users/shuddle/followers","following_url":"https://api.github.com/users/shuddle/following{/other_user}","gists_url":"https://api.github.com/users/shuddle/gists{/gist_id}","starred_url":"https://api.github.com/users/shuddle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shuddle/subscriptions","organizations_url":"https://api.github.com/users/shuddle/orgs","repos_url":"https://api.github.com/users/shuddle/repos","events_url":"https://api.github.com/users/shuddle/events{/privacy}","received_events_url":"https://api.github.com/users/shuddle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shuddle/aasm","description":"AASM - State machines for Ruby classes (plain Ruby, ActiveRecord, Mongoid, MongoMapper)","fork":true,"url":"https://api.github.com/repos/shuddle/aasm","forks_url":"https://api.github.com/repos/shuddle/aasm/forks","keys_url":"https://api.github.com/repos/shuddle/aasm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shuddle/aasm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shuddle/aasm/teams","hooks_url":"https://api.github.com/repos/shuddle/aasm/hooks","issue_events_url":"https://api.github.com/repos/shuddle/aasm/issues/events{/number}","events_url":"https://api.github.com/repos/shuddle/aasm/events","assignees_url":"https://api.github.com/repos/shuddle/aasm/assignees{/user}","branches_url":"https://api.github.com/repos/shuddle/aasm/branches{/branch}","tags_url":"https://api.github.com/repos/shuddle/aasm/tags","blobs_url":"https://api.github.com/repos/shuddle/aasm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shuddle/aasm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shuddle/aasm/git/refs{/sha}","trees_url":"https://api.github.com/repos/shuddle/aasm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shuddle/aasm/statuses/{sha}","languages_url":"https://api.github.com/repos/shuddle/aasm/languages","stargazers_url":"https://api.github.com/repos/shuddle/aasm/stargazers","contributors_url":"https://api.github.com/repos/shuddle/aasm/contributors","subscribers_url":"https://api.github.com/repos/shuddle/aasm/subscribers","subscription_url":"https://api.github.com/repos/shuddle/aasm/subscription","commits_url":"https://api.github.com/repos/shuddle/aasm/commits{/sha}","git_commits_url":"https://api.github.com/repos/shuddle/aasm/git/commits{/sha}","comments_url":"https://api.github.com/repos/shuddle/aasm/comments{/number}","issue_comment_url":"https://api.github.com/repos/shuddle/aasm/issues/comments{/number}","contents_url":"https://api.github.com/repos/shuddle/aasm/contents/{+path}","compare_url":"https://api.github.com/repos/shuddle/aasm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shuddle/aasm/merges","archive_url":"https://api.github.com/repos/shuddle/aasm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shuddle/aasm/downloads","issues_url":"https://api.github.com/repos/shuddle/aasm/issues{/number}","pulls_url":"https://api.github.com/repos/shuddle/aasm/pulls{/number}","milestones_url":"https://api.github.com/repos/shuddle/aasm/milestones{/number}","notifications_url":"https://api.github.com/repos/shuddle/aasm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shuddle/aasm/labels{/name}","releases_url":"https://api.github.com/repos/shuddle/aasm/releases{/id}","created_at":"2015-11-11T18:55:11Z","updated_at":"2015-11-11T18:55:12Z","pushed_at":"2015-12-17T21:34:50Z","git_url":"git://github.com/shuddle/aasm.git","ssh_url":"git@github.com:shuddle/aasm.git","clone_url":"https://github.com/shuddle/aasm.git","svn_url":"https://github.com/shuddle/aasm","homepage":"","size":1325,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"aasm:master","ref":"master","sha":"ea0b5a8a23451897da53127100e51834c62d825f","user":{"login":"aasm","id":1910612,"avatar_url":"https://avatars.githubusercontent.com/u/1910612?v=3","gravatar_id":"","url":"https://api.github.com/users/aasm","html_url":"https://github.com/aasm","followers_url":"https://api.github.com/users/aasm/followers","following_url":"https://api.github.com/users/aasm/following{/other_user}","gists_url":"https://api.github.com/users/aasm/gists{/gist_id}","starred_url":"https://api.github.com/users/aasm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aasm/subscriptions","organizations_url":"https://api.github.com/users/aasm/orgs","repos_url":"https://api.github.com/users/aasm/repos","events_url":"https://api.github.com/users/aasm/events{/privacy}","received_events_url":"https://api.github.com/users/aasm/received_events","type":"Organization","site_admin":false},"repo":{"id":1734,"name":"aasm","full_name":"aasm/aasm","owner":{"login":"aasm","id":1910612,"avatar_url":"https://avatars.githubusercontent.com/u/1910612?v=3","gravatar_id":"","url":"https://api.github.com/users/aasm","html_url":"https://github.com/aasm","followers_url":"https://api.github.com/users/aasm/followers","following_url":"https://api.github.com/users/aasm/following{/other_user}","gists_url":"https://api.github.com/users/aasm/gists{/gist_id}","starred_url":"https://api.github.com/users/aasm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aasm/subscriptions","organizations_url":"https://api.github.com/users/aasm/orgs","repos_url":"https://api.github.com/users/aasm/repos","events_url":"https://api.github.com/users/aasm/events{/privacy}","received_events_url":"https://api.github.com/users/aasm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aasm/aasm","description":"AASM - State machines for Ruby classes (plain Ruby, ActiveRecord, Mongoid, MongoMapper)","fork":false,"url":"https://api.github.com/repos/aasm/aasm","forks_url":"https://api.github.com/repos/aasm/aasm/forks","keys_url":"https://api.github.com/repos/aasm/aasm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aasm/aasm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aasm/aasm/teams","hooks_url":"https://api.github.com/repos/aasm/aasm/hooks","issue_events_url":"https://api.github.com/repos/aasm/aasm/issues/events{/number}","events_url":"https://api.github.com/repos/aasm/aasm/events","assignees_url":"https://api.github.com/repos/aasm/aasm/assignees{/user}","branches_url":"https://api.github.com/repos/aasm/aasm/branches{/branch}","tags_url":"https://api.github.com/repos/aasm/aasm/tags","blobs_url":"https://api.github.com/repos/aasm/aasm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aasm/aasm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aasm/aasm/git/refs{/sha}","trees_url":"https://api.github.com/repos/aasm/aasm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aasm/aasm/statuses/{sha}","languages_url":"https://api.github.com/repos/aasm/aasm/languages","stargazers_url":"https://api.github.com/repos/aasm/aasm/stargazers","contributors_url":"https://api.github.com/repos/aasm/aasm/contributors","subscribers_url":"https://api.github.com/repos/aasm/aasm/subscribers","subscription_url":"https://api.github.com/repos/aasm/aasm/subscription","commits_url":"https://api.github.com/repos/aasm/aasm/commits{/sha}","git_commits_url":"https://api.github.com/repos/aasm/aasm/git/commits{/sha}","comments_url":"https://api.github.com/repos/aasm/aasm/comments{/number}","issue_comment_url":"https://api.github.com/repos/aasm/aasm/issues/comments{/number}","contents_url":"https://api.github.com/repos/aasm/aasm/contents/{+path}","compare_url":"https://api.github.com/repos/aasm/aasm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aasm/aasm/merges","archive_url":"https://api.github.com/repos/aasm/aasm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aasm/aasm/downloads","issues_url":"https://api.github.com/repos/aasm/aasm/issues{/number}","pulls_url":"https://api.github.com/repos/aasm/aasm/pulls{/number}","milestones_url":"https://api.github.com/repos/aasm/aasm/milestones{/number}","notifications_url":"https://api.github.com/repos/aasm/aasm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aasm/aasm/labels{/name}","releases_url":"https://api.github.com/repos/aasm/aasm/releases{/id}","created_at":"2008-02-28T20:40:04Z","updated_at":"2015-12-23T23:20:20Z","pushed_at":"2015-12-18T22:40:01Z","git_url":"git://github.com/aasm/aasm.git","ssh_url":"git@github.com:aasm/aasm.git","clone_url":"https://github.com/aasm/aasm.git","svn_url":"https://github.com/aasm/aasm","homepage":"","size":1657,"stargazers_count":2163,"watchers_count":2163,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":334,"mirror_url":null,"open_issues_count":52,"forks":334,"open_issues":52,"watchers":2163,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aasm/aasm/pulls/298"},"html":{"href":"https://github.com/aasm/aasm/pull/298"},"issue":{"href":"https://api.github.com/repos/aasm/aasm/issues/298"},"comments":{"href":"https://api.github.com/repos/aasm/aasm/issues/298/comments"},"review_comments":{"href":"https://api.github.com/repos/aasm/aasm/pulls/298/comments"},"review_comment":{"href":"https://api.github.com/repos/aasm/aasm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aasm/aasm/pulls/298/commits"},"statuses":{"href":"https://api.github.com/repos/aasm/aasm/statuses/86ac95537b5f162c3df3ea2dabcd8fd98c7d8f25"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":194,"deletions":53,"changed_files":6}}