Sha256: dcce08035380ffb44fcb98b7c9e8ab1d9289736a3a04ef7477de7b1b51f7bd43

Contents?: true

Size: 291 Bytes

Versions: 12

Compression:

Stored size: 291 Bytes

Contents

# frozen_string_literal: true

class Book < ActiveRecord::Base
  has_many :authorships, dependent: :destroy
  has_many :authors, through: :authorships

  has_many :editorships, dependent: :destroy
  has_many :editors, through: :editorships

  has_paper_trail

  def to_s
    title
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
paper_trail_scrapbook-0.2.0 spec/dummy_app/app/models/book.rb
paper_trail_scrapbook-0.1.21 spec/dummy_app/app/models/book.rb
paper_trail_scrapbook-0.1.20 spec/dummy_app/app/models/book.rb
paper_trail_scrapbook-0.1.19 spec/dummy_app/app/models/book.rb
paper_trail_scrapbook-0.1.18 spec/dummy_app/app/models/book.rb
paper_trail_scrapbook-0.1.17 spec/dummy_app/app/models/book.rb
paper_trail_scrapbook-0.1.16 spec/dummy_app/app/models/book.rb
paper_trail_scrapbook-0.1.15 spec/dummy_app/app/models/book.rb
paper_trail_scrapbook-0.1.13 spec/dummy_app/app/models/book.rb
paper_trail_scrapbook-0.1.12 spec/dummy_app/app/models/book.rb
paper_trail_scrapbook-0.1.11 spec/dummy_app/app/models/book.rb
paper_trail_scrapbook-0.1.10 spec/dummy_app/app/models/book.rb