diff options
author | Christoph Helma <helma@in-silico.de> | 2010-02-08 10:34:46 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.de> | 2010-02-08 10:34:46 +0100 |
commit | eab2022b39a07f0b8dcd8c15675d122fb6cea1ac (patch) | |
tree | dc5c61da2eb72bf23ffc58e8c4f75862ea2bf950 | |
parent | b2009ca540178ef4b6f306abdcae8e1895b35b43 (diff) |
started to track tasks from model
-rw-r--r-- | application.rb | 1 | ||||
-rw-r--r-- | lazar.rb | 7 |
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 @@ -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 |