diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-07-10 11:42:51 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2016-07-10 11:42:51 +0900 |
commit | b7d229d1fabbd271fd37e9f4eac316a44d690842 (patch) | |
tree | b11b93c8db6c06ff17be9fd3c93c1bbd4369cc32 /activerecord/test/models | |
parent | 777ff90ab5da3a7cf8522231270b50c4b29fb15f (diff) | |
download | rails-b7d229d1fabbd271fd37e9f4eac316a44d690842.tar.gz rails-b7d229d1fabbd271fd37e9f4eac316a44d690842.tar.bz2 rails-b7d229d1fabbd271fd37e9f4eac316a44d690842.zip |
Correctly return `associated_table` when `associated_with?` is true
`AssociationQueryHandler` requires `association` initialized
`TableMetadata` even if `table_name == arel_table.name`.
Fixes #25689.
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/user.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/models/user.rb b/activerecord/test/models/user.rb index f5dc93e994..97107a35a0 100644 --- a/activerecord/test/models/user.rb +++ b/activerecord/test/models/user.rb @@ -1,6 +1,12 @@ +require 'models/job' + class User < ActiveRecord::Base has_secure_token has_secure_token :auth_token + + has_and_belongs_to_many :jobs_pool, + class_name: Job, + join_table: 'jobs_pool' end class UserWithNotification < User |