aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/history.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-11-03 16:48:52 +0000
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-11-03 16:48:52 +0000
commit4d6b2e47ac5b135097bc8eb7b2b1ebae65668647 (patch)
tree8f6174fafcc7c356087fc209991b89dea0c3295d /lib/mauve/history.rb
parentf93f0948e028c33694cf7f90c7d5918cbf27971c (diff)
parent6f689f2fa872f507527c10fa9b44cdbb96ebd3e0 (diff)
Merge
Diffstat (limited to 'lib/mauve/history.rb')
-rw-r--r--lib/mauve/history.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/mauve/history.rb b/lib/mauve/history.rb
index d9ab8e9..bcdd41a 100644
--- a/lib/mauve/history.rb
+++ b/lib/mauve/history.rb
@@ -80,11 +80,11 @@ module Mauve
property :type, String, :required => true, :default => "unknown", :lazy => false
property :event, Text, :required => true, :default => "Nothing set", :lazy => false
property :user, String
- property :created_at, Time, :required => true
+ property :created_at, EpochTime, :required => true
has n, :alerts, :through => :alerthistory
- before :valid?, :set_created_at
+ before :valid?, :do_set_created_at
before :save, :do_sanitize_html
protected
@@ -110,7 +110,7 @@ module Mauve
# Update the created_at time on the object
#
- def set_created_at(context = :default)
+ def do_set_created_at(context = :default)
self.created_at = Time.now unless self.created_at.is_a?(Time)
end