Skip to content

Instantly share code, notes, and snippets.

@littlemove
Created May 12, 2009 16:16
Show Gist options
  • Save littlemove/110561 to your computer and use it in GitHub Desktop.
Save littlemove/110561 to your computer and use it in GitHub Desktop.
def what_changed(new)
attributes = Array.new
for attr in self.attribute_names
attributes.push(attr) unless (self.send(attr) == new.send(attr))
end
attributes
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment