aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/alert.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mauve/alert.rb')
-rw-r--r--lib/mauve/alert.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/mauve/alert.rb b/lib/mauve/alert.rb
index ed2b1dd..8585767 100644
--- a/lib/mauve/alert.rb
+++ b/lib/mauve/alert.rb
@@ -284,7 +284,7 @@ module Mauve
end
def do_set_timestamps(context = :default)
- self.updated_at = Time.now unless self.original_attributes.has_key?("updated_at")
+ self.updated_at = Time.now if self.dirty?
end
# This is to stop datamapper inserting duff dates into the database.
@@ -364,9 +364,7 @@ module Mauve
end
- if !h.save
- logger.error "Unable to save history due to #{h.errors.inspect}"
- end
+ h.save
end
true