lib/activerecord-bitemporal/bitemporal.rb
def reload(options = nil)
          return active_record_bitemporal_original_reload(options) unless self.class.bi_temporal_model?

          self.class.connection.clear_query_cache

          fresh_object =
            if options && options[:lock]
              self.class.unscoped { self.class.lock(options[:lock]).find(id) }
            else
              self.class.unscoped { self.class.find(id) }
            end

          @attributes = fresh_object.instance_variable_get("@attributes")
          @new_record = false
          # NOTE: Hook to copying swapped_id
          @_swapped_id = fresh_object.swapped_id
          self
        end
# MEMO: Must be override ActiveRecord::Persistence#reload
Must be override ActiveRecord::Persistence#reload
Must be override ActiveRecord :: Persistence#reload
def reload(options = nil)
          return active_record_bitemporal_original_reload(options) unless self.class.bi_temporal_model?
          self.class.connection.clear_query_cache
          fresh_object =
            if options && options[:lock]
              self.class.unscoped { self.class.lock(options[:lock]).find(id) }
            else
              self.class.unscoped { self.class.find(id) }
            end
          @attributes = fresh_object.instance_variable_get("@attributes")
          @new_record = false
          @_swapped_id = fresh_object.swapped_id
          self
        end
def reload ( options = nil ) return active_record_bitemporal_original_reload ( options ) unless self . class . bi_temporal_model? self . class . connection . clear_query_cache fresh_object = if options && options [ :lock ] self . class . unscoped { self . class . lock ( options [ :lock ] ) . find ( id ) } else self . class . unscoped { self . class . find ( id ) } end @attributes = fresh_object . instance_variable_get ( "@attributes" ) @new_record = false @_swapped_id = fresh_object . swapped_id self end
MEMO: Must be override ActiveRecord::Persistence#reload
MEMO : Must be override ActiveRecord :: Persistence#reload
# NOTE: Hook to copying swapped_id
options