class PaperTrailScrapbook::JournalEntry

Class JournalEntry provides single version history analysis

@author Jason Dinsmore <jason@hint.io>

Public Instance Methods

story() click to toggle source

Single version historical analysis

@return [String] Human readable description of changes

# File lib/paper_trail_scrapbook/journal_entry.rb, line 21
def story
  updates = changes
  return unless create? || updates.present? || !config.filter_non_changes

  "#{preface}\n#{updates}"
end

Private Instance Methods

preface() click to toggle source
# File lib/paper_trail_scrapbook/journal_entry.rb, line 30
def preface
  "On #{whenn}, #{kind} #{model}[#{model_id}]:".squeeze(' ')
end