lib/logidze/model.rb
# Revert record to the version at specified time (without saving to DB)
Revert record to the version at specified time (without saving to DB)
Revert record to the version at specified time ( without saving to DB )
def at!(ts = nil, time: nil, version: nil)
      Deprecations.show_ts_deprecation_for("#at!") if ts
      return at_version!(version) if version
      time ||= ts
      time = parse_time(time)
      return self if log_data.current_ts?(time)
      return false unless log_data.exists_ts?(time)
      version = log_data.find_by_time(time).version
      apply_diff(version, log_data.changes_to(version: version))
    end
def at! ( ts = nil , time : nil , version : nil ) Deprecations . show_ts_deprecation_for ( "#at!" ) if ts return at_version! ( version ) if version time ||= ts time = parse_time ( time ) return self if log_data . current_ts? ( time ) return false unless log_data . exists_ts? ( time ) version = log_data . find_by_time ( time ) . version apply_diff ( version , log_data . changes_to ( version : version ) ) end
Revert record to the version at specified time (without saving to DB)
Revert record to the version at specified time ( without saving to DB )
ts
<not_specific>
time
<not_specific>
version
<not_specific>