mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
b7d229d1fa
`AssociationQueryHandler` requires `association` initialized `TableMetadata` even if `table_name == arel_table.name`. Fixes #25689.
14 lines
318 B
Ruby
14 lines
318 B
Ruby
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
|
|
after_create -> { Notification.create! message: "A new user has been created." }
|
|
end
|