From eab2022b39a07f0b8dcd8c15675d122fb6cea1ac Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Mon, 8 Feb 2010 10:34:46 +0100 Subject: started to track tasks from model --- application.rb | 1 + lazar.rb | 7 +++++++ 2 files changed, 8 insertions(+) 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 -- cgit v1.2.3