Skip to content
Snippets Groups Projects
Verified Commit 13a86c78 authored by Alexander Olofsson's avatar Alexander Olofsson
Browse files

Support checking individual model attribute status

parent ccbe6cfd
No related branches found
No related tags found
No related merge requests found
......@@ -261,7 +261,9 @@ module LiudeskCMDB
@data.merge!(attrs.select { |k, _| self.class.fields.key? k })
end
def changed?
def changed?(key = nil)
return @data[key] != @old_data[key] if key
@data != @old_data
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment