# File lib/state_machine/integrations/active_model.rb, line 286
      def write(object, attribute, value, *args)
        result = super
        
        if (attribute == :state || attribute == :event && value) && supports_dirty_tracking?(object) && !object.send("#{self.attribute}_changed?")
          object.send("#{self.attribute}_will_change!")
        end
        
        result
      end