{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/15106","labels_url":"https://api.github.com/repos/rails/rails/issues/15106/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/15106/comments","events_url":"https://api.github.com/repos/rails/rails/issues/15106/events","html_url":"https://github.com/rails/rails/pull/15106","id":33475780,"number":15106,"title":"Make the transactional callbacks act in the same order as all other ones","user":{"login":"piotrj","id":9296,"avatar_url":"https://avatars.githubusercontent.com/u/9296?v=3","gravatar_id":"","url":"https://api.github.com/users/piotrj","html_url":"https://github.com/piotrj","followers_url":"https://api.github.com/users/piotrj/followers","following_url":"https://api.github.com/users/piotrj/following{/other_user}","gists_url":"https://api.github.com/users/piotrj/gists{/gist_id}","starred_url":"https://api.github.com/users/piotrj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piotrj/subscriptions","organizations_url":"https://api.github.com/users/piotrj/orgs","repos_url":"https://api.github.com/users/piotrj/repos","events_url":"https://api.github.com/users/piotrj/events{/privacy}","received_events_url":"https://api.github.com/users/piotrj/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":null,"milestone":{"url":"https://api.github.com/repos/rails/rails/milestones/34","labels_url":"https://api.github.com/repos/rails/rails/milestones/34/labels","id":665192,"number":34,"title":"5.0.0","description":null,"creator":{"login":"rafaelfranca","id":47848,"avatar_url":"https://avatars.githubusercontent.com/u/47848?v=3","gravatar_id":"","url":"https://api.github.com/users/rafaelfranca","html_url":"https://github.com/rafaelfranca","followers_url":"https://api.github.com/users/rafaelfranca/followers","following_url":"https://api.github.com/users/rafaelfranca/following{/other_user}","gists_url":"https://api.github.com/users/rafaelfranca/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaelfranca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaelfranca/subscriptions","organizations_url":"https://api.github.com/users/rafaelfranca/orgs","repos_url":"https://api.github.com/users/rafaelfranca/repos","events_url":"https://api.github.com/users/rafaelfranca/events{/privacy}","received_events_url":"https://api.github.com/users/rafaelfranca/received_events","type":"User","site_admin":false},"open_issues":97,"closed_issues":57,"state":"open","created_at":"2014-05-21T00:58:22Z","updated_at":"2015-02-06T22:58:11Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2014-05-14T09:28:50Z","updated_at":"2015-02-07T04:02:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/15106","html_url":"https://github.com/rails/rails/pull/15106","diff_url":"https://github.com/rails/rails/pull/15106.diff","patch_url":"https://github.com/rails/rails/pull/15106.patch"},"body":"All the calllbacks except for transactional are executed in the order they are defined. Transactional callbacks are executed in reverse order. It's because active_model/callbacks#_define_after_model_callback forces options[:prepend] = true. This means that every after_* callback gets prepend = true by default. Transactional callbacks have their own methods defined in active_record/transaction. Methods for after_commit and after_rollback did not enfore the options[:prepend] = true and that's where the inconsistency comes from."},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/73348654","html_url":"https://github.com/rails/rails/pull/15106#issuecomment-73348654","issue_url":"https://api.github.com/repos/rails/rails/issues/15106","id":73348654,"user":{"login":"arthurnn","id":833383,"avatar_url":"https://avatars.githubusercontent.com/u/833383?v=3","gravatar_id":"","url":"https://api.github.com/users/arthurnn","html_url":"https://github.com/arthurnn","followers_url":"https://api.github.com/users/arthurnn/followers","following_url":"https://api.github.com/users/arthurnn/following{/other_user}","gists_url":"https://api.github.com/users/arthurnn/gists{/gist_id}","starred_url":"https://api.github.com/users/arthurnn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arthurnn/subscriptions","organizations_url":"https://api.github.com/users/arthurnn/orgs","repos_url":"https://api.github.com/users/arthurnn/repos","events_url":"https://api.github.com/users/arthurnn/events{/privacy}","received_events_url":"https://api.github.com/users/arthurnn/received_events","type":"User","site_admin":false},"created_at":"2015-02-07T04:02:27Z","updated_at":"2015-02-07T04:02:27Z","body":"My take here is :-1: on adding new callbacks. after_commit and after_rollback are enough , and complex enough TBH."}}