aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/alert.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-07-14 18:00:49 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-07-14 18:00:49 +0100
commit18b0906630ab4165d1e8b4bc66d7446b17c31605 (patch)
tree359b6018b6c7327d3c72c23516cd9378ce01a866 /lib/mauve/alert.rb
parent494b083408b354f38da9b1fc5e8ffb7238d009b3 (diff)
* Improved logging.
* Updated message suppression
Diffstat (limited to 'lib/mauve/alert.rb')
-rw-r--r--lib/mauve/alert.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/mauve/alert.rb b/lib/mauve/alert.rb
index 07aeb55..80e1485 100644
--- a/lib/mauve/alert.rb
+++ b/lib/mauve/alert.rb
@@ -85,9 +85,11 @@ module Mauve
validates_with_method :check_dates
- def to_s
- "#<Alert:#{id} #{alert_id} from #{source} update_type #{update_type}>"
+ def inspect
+ "#<Alert #{id}, alert_id #{alert_id}, source #{source}>"
end
+
+ alias to_s inspect
def check_dates
bad_dates = self.attributes.find_all do |key, value|
@@ -210,6 +212,8 @@ module Mauve
end
end
+ logger.info "#{self.inspect} updated." unless @attributes_before_save.empty?
+
true
end