diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-11-27 11:51:47 +0000 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-11-27 11:51:47 +0000 |
commit | 11999e9c25d237bae2b6eb51ed20e63b2db9c2c7 (patch) | |
tree | 5aeb8c9ab561a6e076ff63aeb5f3fdc4c9714b84 /lib/mauve/alert.rb | |
parent | 791abff5faabfc14568cdcaf0be553eb05947372 (diff) |
Be more picky when setting updated_at/created_at timestamps.
Diffstat (limited to 'lib/mauve/alert.rb')
-rw-r--r-- | lib/mauve/alert.rb | 6 |
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 |