aboutsummaryrefslogblamecommitdiffstats
path: root/activerecord/test/models/pet.rb
blob: 113826756a14fe51ce362a6c127a88cbef231d37 (plain) (tree)
1
2
3
4
5
6
7
8
                              


                             
                         
                                   
                
 



                                       
                           
                                                  

     
   
class Pet < ActiveRecord::Base

  attr_accessor :current_user

  set_primary_key :pet_id
  belongs_to :owner, :touch => true
  has_many :toys

  class << self
    attr_accessor :after_destroy_output
  end

  after_destroy do |record|
    Pet.after_destroy_output = record.current_user
  end

end