{"action":"opened","issue":{"url":"https://api.github.com/repos/rails/rails/issues/32765","repository_url":"https://api.github.com/repos/rails/rails","labels_url":"https://api.github.com/repos/rails/rails/issues/32765/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/32765/comments","events_url":"https://api.github.com/repos/rails/rails/issues/32765/events","html_url":"https://github.com/rails/rails/issues/32765","id":318932894,"number":32765,"title":"Nested dependent: :destroy not called. Expected behavor?","user":{"login":"bryanculver","id":31187,"avatar_url":"https://avatars0.githubusercontent.com/u/31187?v=4","gravatar_id":"","url":"https://api.github.com/users/bryanculver","html_url":"https://github.com/bryanculver","followers_url":"https://api.github.com/users/bryanculver/followers","following_url":"https://api.github.com/users/bryanculver/following{/other_user}","gists_url":"https://api.github.com/users/bryanculver/gists{/gist_id}","starred_url":"https://api.github.com/users/bryanculver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryanculver/subscriptions","organizations_url":"https://api.github.com/users/bryanculver/orgs","repos_url":"https://api.github.com/users/bryanculver/repos","events_url":"https://api.github.com/users/bryanculver/events{/privacy}","received_events_url":"https://api.github.com/users/bryanculver/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-30T15:31:18Z","updated_at":"2018-04-30T15:31:18Z","closed_at":null,"author_association":"NONE","body":"### Steps to reproduce\r\n\r\n1. Setup nested has_many, has_many :through, has_one associations between models (see [this gist](https://gist.github.com/bryanculver/35e97d56988a00ac47560268e1e0e18e))\r\n2. Create records to fill associations (see `sample_data.yml` in example above)\r\n3. Update has_many collection via has_many :through association that is missing user originally in collection (example pertaining to above):\r\n```\r\nevent = Event.find(1)\r\nuser_a = User.find(1)\r\n\r\nevent.users = [user_a] # Now missing user_b\r\n```\r\n\r\n### Expected behavior\r\nRecords attached via has_one association should be deleted.\r\n\r\n### Actual behavior\r\nRecords persist but are now \"orphaned\"\r\n\r\n### System configuration\r\n**Rails version**: 5.1.5\r\n\r\n**Ruby version**: 2.4.1p111\r\n"}}
{"actor":{"display_login":"bryanculver"}}