You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: dirty.rb
    path of file: ./repos/all_futures/lib/all_futures
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module AllFutures
  module Dirty
    extend ActiveSupport::Concern

    def attribute_change(attribute)
      _raise_unknown_attribute_error(attribute) unless attributes.key?(attribute.to_s)
      attribute_was(attribute) == self[attribute] ? nil : [attribute_was(attribute), sel
    
      def set_previous_attributes(model, record)
        tracker = ActiveModel::AttributeMutationTracker.new(model.instance_variable_get("@attributes"))
        previous_values = tracker.instance_variable_get("@attributes").instance_variable_get("@attributes")
        previous_values.each do |key, attribute|
          original = attribute.instance_variable_get("@original_attribute")
          original.instance_variable_set("@value_before_type_cast", record["previous_attributes"][key]) unless original.nil?
        end
        model.instance_variable_set "@mutations_before_last_save", tracker
      end