class Audited::YAMLIfTextColumnType

Audit saves the changes to ActiveRecord models. It has the following attributes:

Public Class Methods

dump(obj) click to toggle source
# File lib/audited/audit.rb, line 28
def dump(obj)
  if text_column?
    ActiveRecord::Coders::YAMLColumn.new(Object).dump(obj)
  else
    obj
  end
end
load(obj) click to toggle source
# File lib/audited/audit.rb, line 20
def load(obj)
  if text_column?
    ActiveRecord::Coders::YAMLColumn.new(Object).load(obj)
  else
    obj
  end
end
text_column?() click to toggle source
# File lib/audited/audit.rb, line 36
def text_column?
  Audited.audit_class.columns_hash["audited_changes"].type.to_s == "text"
end