summaryrefslogtreecommitdiff
path: root/model.rb
diff options
context:
space:
mode:
authormr <mr@mrautenberg.de>2011-03-31 13:07:42 +0200
committermr <mr@mrautenberg.de>2011-03-31 13:07:42 +0200
commit0247fc14a80a98309bfe99794be51311ac8114e0 (patch)
treee0d512e97668339c6864c4a559ce592cac445691 /model.rb
parent7728e43afb3d7d67e9405288df55799fe88205e7 (diff)
parent52d24617271835c0fc7702d6fea8592bc4151b15 (diff)
Merge branch 'feature/merge_rautenberg_features' into development
Diffstat (limited to 'model.rb')
-rw-r--r--model.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/model.rb b/model.rb
index 5332629..58eeecf 100644
--- a/model.rb
+++ b/model.rb
@@ -1,13 +1,20 @@
require 'ohm'
+require 'ohm/contrib'
+#require 'redis/objects'
+#@@redis = Redis.new(:thread_safe=>true)#(:host => '127.0.0.1', :port => 6379)
class ToxCreateModel < Ohm::Model
+ 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
@@ -42,7 +49,7 @@ class ToxCreateModel < Ohm::Model
attr_accessor :subjectid
@subjectid = nil
- #after :save, :check_policy
+ after :save, :check_policy
def validation_status
begin