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



65
66
67
68
69
70
71
72
73
74
75
76
# File 'app/models/concerns/acts_as_loggable.rb', line 65

def log_changes_datatable
  if persisted?
    @log_changes_datatable ||= (
      Effective::Datatables::Logs.new(
        associated_id: id,
        associated_type: self.class.name,
        status: false,
        log_changes: true
      )
    )
  end
end

#log_changes_formatted_attribute(attribute) ⇒ Object

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



56
57
58
# File 'app/models/concerns/acts_as_loggable.rb', line 56

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



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

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