aboutsummaryrefslogblamecommitdiffstats
path: root/activerecord/test/models/user.rb
blob: a40385e04779d26b44405afce6da1db3f95abb6e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11


                               


                                                           
   



                                                                                  
class User < ActiveRecord::Base
  has_secure_token
  has_secure_token :auth_token
  has_secure_token :conditional_token, if: :token_condition

  attr_accessor :token_condition
end

class UserWithNotification < User
  after_create -> { Notification.create! message: "A new user has been created." }
end