diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-11-03 16:47:32 +0000 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-11-03 16:47:32 +0000 |
commit | 6f689f2fa872f507527c10fa9b44cdbb96ebd3e0 (patch) | |
tree | 253f15908d8bc7b7dd854001df0f5859869a1538 /lib/mauve/history.rb | |
parent | 0515cd0ecd48494058e12f96233199026133124c (diff) |
Fixed everything up to use EpochTime everywhere instead of regular Times.
Datamapper can't handle timezones.
Diffstat (limited to 'lib/mauve/history.rb')
-rw-r--r-- | lib/mauve/history.rb | 6 |
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 |