Class: PaperTrailScrapbook::JournalEntry Private

Inherits:
Object
  • Object
show all
Includes:
Adamantium::Flat, VersionHelpers
Defined in:
lib/paper_trail_scrapbook/journal_entry.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Class JournalEntry provides single version history analysis

Author:

Instance Method Summary collapse

Methods included from VersionHelpers

#changes, #config, #create?, #destroy?, #kind, #model, #model_id, #whenn, #who, #whodunnit_class, #whodunnit_instance

Instance Method Details

#storyString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Single version historical analysis

Returns:

  • (String)

    Human readable description of changes



21
22
23
24
25
26
# 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