module UntraceableSave

Constants

VERSION

Public Class Methods

record_timestamps() click to toggle source
# File lib/untraceable-save.rb, line 13
def record_timestamps; false; end

Public Instance Methods

quiet_save(options = {}) click to toggle source

update record without validation and timestamping

# File lib/untraceable-save.rb, line 26
def quiet_save(options = {})
  options[:validate] = false

  self.untraceable_save(options)
end
quiet_save!(options = {}) click to toggle source

update record without validation and timestamping

# File lib/untraceable-save.rb, line 48
def quiet_save!(options = {})
  options[:validate] = false

  self.untraceable_save!(options)
end
untraceable_save(options = {}) click to toggle source

update that record without timestamping

# File lib/untraceable-save.rb, line 11
def untraceable_save(options = {})
  class << self
    def record_timestamps; false; end
  end

  ret = save options

  class << self
    remove_method :record_timestamps
  end

  ret
end
untraceable_save!(options = {}) click to toggle source

update that record without timestamping

# File lib/untraceable-save.rb, line 33
def untraceable_save!(options = {})
  class << self
    def record_timestamps; false; end
  end

  ret = save! options

  class << self
    remove_method :record_timestamps
  end

  ret
end