Module: ActsAsLoggable

Extended by:
ActiveSupport::Concern
Defined in:
app/models/concerns/acts_as_loggable.rb

Defined Under Namespace

Modules: ActiveRecord, ClassMethods

Instance Method Summary collapse

Instance Method Details

#log_changes_datatableObject



80
81
82
83
84
85
86
# File 'app/models/concerns/acts_as_loggable.rb', line 80

def log_changes_datatable
  return nil unless persisted?

  @log_changes_datatable ||= (
    EffectiveLogsDatatable.new(associated_id: id, associated_type: self.class.name, log_changes: true, status: false)
  )
end

#log_changes_formatted_attribute(attribute) ⇒ Object

Format the title of this attribute. Return nil to use the default attribute.titleize



71
72
73
# File 'app/models/concerns/acts_as_loggable.rb', line 71

def log_changes_formatted_attribute(attribute)
  # Intentionally does nothing
end

#log_changes_formatted_value(attribute, value) ⇒ Object

Format the value of this attribute. Return nil to use the default to_s



76
77
78
# File 'app/models/concerns/acts_as_loggable.rb', line 76

def log_changes_formatted_value(attribute, value)
  # Intentionally does nothing
end