1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/models/user.rb
Xavier Noria 9617db2078 applies new string literal convention in activerecord/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:26:53 +02:00

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