Sha256: bcfaa8cef9987ed76d558aad43c7afc28910004486a06c6fb3f02214be0b9fc0

Contents?: true

Size: 515 Bytes

Versions: 8

Compression:

Stored size: 515 Bytes

Contents

class Reference < ActiveRecord::Base
  belongs_to :person
  belongs_to :job

  has_many :agents_posts_authors, :through => :person

  class << self; attr_accessor :make_comments; end
  self.make_comments = false

  before_destroy :make_comments

  def make_comments
    if self.class.make_comments
      person.update comments: "Reference destroyed"
    end
  end
end

class BadReference < ActiveRecord::Base
  self.table_name = 'references'
  default_scope { where(:favourite => false) }
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ibm_db-5.2.0-x86-mingw32 test/models/reference.rb
ibm_db-5.1.0-x86-mingw32 test/models/reference.rb
ibm_db-5.0.5-x86-mingw32 test/models/reference.rb
ibm_db-5.0.4-x86-mingw32 test/models/reference.rb
ibm_db-5.0.3-x86-mingw32 test/models/reference.rb
ibm_db-5.0.2-x86-mingw32 test/models/reference.rb
ibm_db-3.0.5-x86-mingw32 test/models/reference.rb
ibm_db-3.0.5 test/models/reference.rb