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



71
72
73
74
75
76
77
78
79
80
81
# File 'app/models/concerns/acts_as_loggable.rb', line 71

def log_changes_datatable
  return nil unless persisted?

  @log_changes_datatable ||= (
    if Gem::Version.new(EffectiveDatatables::VERSION) < Gem::Version.new('3.0')
      Effective::Datatables::Logs.new(associated_id: id, associated_type: self.class.name, log_changes: true, status: false)
    else
      EffectiveLogsDatatable.new(associated_id: id, associated_type: self.class.name, log_changes: true, status: false)
    end
  )
end

#log_changes_formatted_attribute(attribute) ⇒ Object

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



62
63
64
# File 'app/models/concerns/acts_as_loggable.rb', line 62

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



67
68
69
# File 'app/models/concerns/acts_as_loggable.rb', line 67

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