{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/26890","repository_url":"https://api.github.com/repos/rails/rails","labels_url":"https://api.github.com/repos/rails/rails/issues/26890/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/26890/comments","events_url":"https://api.github.com/repos/rails/rails/issues/26890/events","html_url":"https://github.com/rails/rails/issues/26890","id":185153364,"number":26890,"title":"Has and belongs to many documentation","user":{"login":"j-dexx","id":6691543,"avatar_url":"https://avatars.githubusercontent.com/u/6691543?v=3","gravatar_id":"","url":"https://api.github.com/users/j-dexx","html_url":"https://github.com/j-dexx","followers_url":"https://api.github.com/users/j-dexx/followers","following_url":"https://api.github.com/users/j-dexx/following{/other_user}","gists_url":"https://api.github.com/users/j-dexx/gists{/gist_id}","starred_url":"https://api.github.com/users/j-dexx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j-dexx/subscriptions","organizations_url":"https://api.github.com/users/j-dexx/orgs","repos_url":"https://api.github.com/users/j-dexx/repos","events_url":"https://api.github.com/users/j-dexx/events{/privacy}","received_events_url":"https://api.github.com/users/j-dexx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-25T15:34:27Z","updated_at":"2016-10-25T16:52:47Z","closed_at":null,"body":"[Guides Link](http://guides.rubyonrails.org/association_basics.html#has-and-belongs-to-many-association-reference#methods-added-by-has-and-belongs-to-many-collection-delete-object)\r\n\r\n> The collection.destroy method removes one or more objects from the collection by running destroy on each record in the join table, including running callbacks. This does not destroy the objects.\r\n\r\nThis can't be correct for has and belongs to many, as there isn't a join model to initialize and run callbacks on.\r\n\r\nIn addition to me the warning on delete doesn't make sense either.\r\n\r\n> This does not trigger callbacks on the join records.\r\n\r\nI assume the content was just copied from `has_many` when the docs were written.  Happy to submit a PR but not sure what you'd want it to say instead, I'm not sure if it's just an alias on HABTM?  I'm assuming not"},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/256093609","html_url":"https://github.com/rails/rails/issues/26890#issuecomment-256093609","issue_url":"https://api.github.com/repos/rails/rails/issues/26890","id":256093609,"user":{"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},"created_at":"2016-10-25T16:52:47Z","updated_at":"2016-10-25T16:52:47Z","body":"You are right about the two points. What we can write is that it remove the records from the join table but doesn't destroy the objects. No need to talk about callbacks.\r\n\r\nCould you submit the PR?"}}
{"actor":{"display_login":"rafaelfranca"}}