{"comment":{"url":"https://api.github.com/repos/rails/rails/comments/14104946","html_url":"https://github.com/rails/rails/commit/1119c89297f793b1b75f9ac1ecde280729118768#commitcomment-14104946","id":14104946,"user":{"login":"pixeltrix","id":6321,"avatar_url":"https://avatars.githubusercontent.com/u/6321?v=3","gravatar_id":"","url":"https://api.github.com/users/pixeltrix","html_url":"https://github.com/pixeltrix","followers_url":"https://api.github.com/users/pixeltrix/followers","following_url":"https://api.github.com/users/pixeltrix/following{/other_user}","gists_url":"https://api.github.com/users/pixeltrix/gists{/gist_id}","starred_url":"https://api.github.com/users/pixeltrix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pixeltrix/subscriptions","organizations_url":"https://api.github.com/users/pixeltrix/orgs","repos_url":"https://api.github.com/users/pixeltrix/repos","events_url":"https://api.github.com/users/pixeltrix/events{/privacy}","received_events_url":"https://api.github.com/users/pixeltrix/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"1119c89297f793b1b75f9ac1ecde280729118768","created_at":"2015-10-30T21:56:30Z","updated_at":"2015-10-30T21:56:30Z","body":"@isaacsloan using `:class` prior to 4.2 would raise an `ArgumentError` - this commit is effectively fixing that regression whilst still allowing `has_and_belongs_to_many` to be implemented as a special case for `has_many :through`. As @rafaelfranca said the option `:class` or `:anonymous_class` should not appear in the exception message and how we implement `has_and_belongs_to_many` should not leak out into the Rails public API."}}