def restore_transaction_record_state(force = false) #:nodoc:
      if defined?(@_start_transaction_state)
        @_start_transaction_state[:level] = (@_start_transaction_state[:level] || 0) - 1
        if @_start_transaction_state[:level] < 1 || force
          restore_state = remove_instance_variable(:@_start_transaction_state)
          was_frozen = restore_state[:frozen?]
          @attributes = @attributes.dup if @attributes.frozen?
          @new_record = restore_state[:new_record]
          @destroyed  = restore_state[:destroyed]
          if restore_state.has_key?(:id)
            self.id = restore_state[:id]
          else
            @attributes.delete(self.class.primary_key)
            @attributes_cache.delete(self.class.primary_key)
          end
          @attributes.freeze if was_frozen
        end
      end
    end
def restore_transaction_record_state(force = false) #:nodoc:
      if defined?(@_start_transaction_state)
        @_start_transaction_state[:level] = (@_start_transaction_state[:level] || 0) - 1
        if @_start_transaction_state[:level] < 1 || force
          restore_state = remove_instance_variable(:@_start_transaction_state)
          was_frozen = restore_state[:frozen?]
          @attributes = @attributes.dup if @attributes.frozen?
          @new_record = restore_state[:new_record]
          @destroyed  = restore_state[:destroyed]
          if restore_state.has_key?(:id)
            self.id = restore_state[:id]
          else
            @attributes.delete(self.class.primary_key)
            @attributes_cache.delete(self.class.primary_key)
          end
          @attributes.freeze if was_frozen
        end
      end
    end
Restore the new record state and id of a record that was previously saved by a call to save_record_state.