From a6ee4587bfcb565e87ab597b4e1156467ab67152 Mon Sep 17 00:00:00 2001 From: mr Date: Tue, 15 Mar 2011 12:14:14 +0100 Subject: sorting of models, created_at automation, ohm::callback --- model.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'model.rb') diff --git a/model.rb b/model.rb index 7b91bab..7e33a67 100644 --- a/model.rb +++ b/model.rb @@ -1,4 +1,5 @@ require 'ohm' +require 'ohm/contrib' #require 'redis/objects' #@@redis = Redis.new(:thread_safe=>true)#(:host => '127.0.0.1', :port => 6379) @@ -7,12 +8,16 @@ class ToxCreateModel < Ohm::Model #include Redis::Objects #include DataMapper::Resource #attribute :id + include Ohm::Callbacks + include Ohm::Typecast + include Ohm::Timestamping + attribute :name attribute :warnings attribute :error_messages attribute :type attribute :status - attribute :created_at + attribute :created_at, Date attribute :task_uri attribute :uri -- cgit v1.2.3