summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.de>2010-02-08 10:34:46 +0100
committerChristoph Helma <helma@in-silico.de>2010-02-08 10:34:46 +0100
commiteab2022b39a07f0b8dcd8c15675d122fb6cea1ac (patch)
treedc5c61da2eb72bf23ffc58e8c4f75862ea2bf950
parentb2009ca540178ef4b6f306abdcae8e1895b35b43 (diff)
started to track tasks from model
-rw-r--r--application.rb1
-rw-r--r--lazar.rb7
2 files changed, 8 insertions, 0 deletions
diff --git a/application.rb b/application.rb
index 26c5352..6f4dd29 100644
--- a/application.rb
+++ b/application.rb
@@ -6,6 +6,7 @@ class Model
include DataMapper::Resource
property :id, Serial
property :uri, String, :length => 100
+ #property :task_uri, String, :length => 100
property :owl, Text
property :yaml, Text
property :created_at, DateTime
diff --git a/lazar.rb b/lazar.rb
index 4b32d0c..4c10c04 100644
--- a/lazar.rb
+++ b/lazar.rb
@@ -73,9 +73,16 @@ class Lazar < Model
end
post '/?' do # create model
+ #model = Lazar.new(:task_uri => params[:task_uri])
+ #model.uri = url_for("/#{model.id}", :full)
model = Lazar.new
model.save
model.uri = url_for("/#{model.id}", :full)
+# model.uri
+#end
+#
+#put '/:id/?' do # create model from yaml representation
+# model = Lazar.first(params[:id])
case request.content_type
when /yaml/
input = request.env["rack.input"].read