{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/22394","labels_url":"https://api.github.com/repos/rails/rails/issues/22394/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/22394/comments","events_url":"https://api.github.com/repos/rails/rails/issues/22394/events","html_url":"https://github.com/rails/rails/pull/22394","id":118628106,"number":22394,"title":"Updated the guides for having a distinct has_many through at the data…","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,"milestone":null,"comments":1,"created_at":"2015-11-24T15:05:40Z","updated_at":"2015-11-24T15:08:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/22394","html_url":"https://github.com/rails/rails/pull/22394","diff_url":"https://github.com/rails/rails/pull/22394.diff","patch_url":"https://github.com/rails/rails/pull/22394.patch"},"body":"…base level\r\n\r\nThe current example\r\n\r\n    add_index :person_articles, :article, unique: true\r\n\r\nDoes not work, the `:article` column does not exist as it will be\r\na join table (based on the prior example) so should use :article_id\r\n\r\nThe documentation seems to suggest that it will allow an article to\r\nbe added only once to a person via the join table, what actually\r\noccurs is that it only allows the article to be added to one person,\r\nat which point it should be a `belongs_to` association.\r\n\r\nAlso changed the new example to use readings based on the prior example"},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/159295928","html_url":"https://github.com/rails/rails/pull/22394#issuecomment-159295928","issue_url":"https://api.github.com/repos/rails/rails/issues/22394","id":159295928,"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},"created_at":"2015-11-24T15:08:33Z","updated_at":"2015-11-24T15:08:33Z","body":"Sorry if I've contributed to the docs in the wrong way, but the [guides reference docrails](http://guides.rubyonrails.org/contributing_to_ruby_on_rails.html#contributing-to-the-rails-documentation) which doesn't exist anymore"}}