def diff(other)
      check_class_compatibility(self, other)
      
      self_attribs = self.get_attributes(self.class.excluded_fields)
      other_attribs = other.get_attributes(other.class.excluded_fields)
      
      change = compare_objects(self_attribs, other_attribs, self, other)
      
      #the last bit - no change, no report; simples
      if other.class.conditional_fields
        other.class.conditional_fields.each do |key|
          change[key.to_sym] = eval("other.#{key}") unless change.empty?
        end
      end
      change
    end
def diff(other)
      check_class_compatibility(self, other)
      
      self_attribs = self.get_attributes(self.class.excluded_fields)
      other_attribs = other.get_attributes(other.class.excluded_fields)
      
      change = compare_objects(self_attribs, other_attribs, self, other)
      
      #the last bit - no change, no report; simples
      if other.class.conditional_fields
        other.class.conditional_fields.each do |key|
          change[key.to_sym] = eval("other.#{key}") unless change.empty?
        end
      end
      change
    end
Produces a Hash containing the differences between the calling object
 and the object passed in as a parameter