Sha256: 55a064351698bcc3c8bd70d2661d266a75353d49d00ab754ff1a003d62a4c990

Contents?: true

Size: 262 Bytes

Versions: 8

Compression:

Stored size: 262 Bytes

Contents

class Person < ActiveRecord::Base
  has_many :authorships, foreign_key: :author_id, dependent: :destroy
  has_many :books, through: :authorships
  belongs_to :mentor, class_name: 'Person', foreign_key: :mentor_id
  has_paper_trail

  def to_s
    name
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
paper_trail_scrapbook-0.1.9 spec/dummy_app/app/models/person.rb
paper_trail_scrapbook-0.1.8 spec/dummy_app/app/models/person.rb
paper_trail_scrapbook-0.1.7 spec/dummy_app/app/models/person.rb
paper_trail_scrapbook-0.1.6 spec/dummy_app/app/models/person.rb
paper_trail_scrapbook-0.1.3 spec/dummy_app/app/models/person.rb
paper_trail_scrapbook-0.1.2 spec/dummy_app/app/models/person.rb
paper_trail_scrapbook-0.1.1 spec/dummy_app/app/models/person.rb
paper_trail_scrapbook-0.1.0 spec/dummy_app/app/models/person.rb