From 6f689f2fa872f507527c10fa9b44cdbb96ebd3e0 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Thu, 3 Nov 2011 16:47:32 +0000 Subject: Fixed everything up to use EpochTime everywhere instead of regular Times. Datamapper can't handle timezones. --- lib/mauve/history.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/mauve/history.rb') 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 -- cgit v1.2.1