From ecf16a331d875cbbd5a31e33861ef913d4429879 Mon Sep 17 00:00:00 2001 From: Jeff Hogan Date: Wed, 26 Oct 2011 21:43:28 -0700 Subject: [PATCH] tinkering with new database setup and instantiation --- application.rb | 12 ++++-------- database.db | Bin 12288 -> 12288 bytes 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/application.rb b/application.rb index 43fb462..1990dc9 100644 --- a/application.rb +++ b/application.rb @@ -10,19 +10,15 @@ class Navigation include DataMapper::Resource - property :id , Serial, :required => true - property :created_at , DateTime + property :id , Serial, :required => true + property :department , String + property :location , String end DataMapper.finalize.auto_upgrade! -post '/' do - - newRow.created_at = Time.now - newRow.save - -end +nav = Navigation.create department: "Web Design & Interactive Media", location: "/wdim" get '/' do diff --git a/database.db b/database.db index a2573e55e0fbcd7f167cd74032dbd4b8a33b3e19..2a60cb467cabcaa6a0c1010649a222f074d02c81 100644 GIT binary patch delta 190 zcmZojXh@hK&B!!S##xYwLHCg?F9QPu6F(ONe+)m@#==>AlU4YGITab%#g&yAn>Z&o z@Ml@2q!uI=mE@-8l_)8MIR-g