Skip to content
Browse files

Changes for DM 1.0

  • Loading branch information...
1 parent e8e4f21 commit 68d0ad39616e5048b971a9efeef3e9d3c295635c @namelessjon committed Oct 19, 2010
Showing with 3 additions and 2 deletions.
  1. +1 −0 ditty.rb
  2. +2 −2 models.rb
View
1 ditty.rb
@@ -1,6 +1,7 @@
require 'sinatra'
require 'dm-core'
require 'dm-validations'
+require 'dm-migrations'
require 'json'
require 'redcloth'
require 'haml'
View
4 models.rb
@@ -2,7 +2,7 @@ class Ditty
include DataMapper::Resource
property :id, Serial
- property :title, String, :unique => true, :unique_index => true, :index => true, :nullable => false
- property :body, Text, :nullable => false, :messages => { :presence => 'Ditty needs content' }
+ property :title, String, :unique => true, :required => true
+ property :body, Text, :required => true, :messages => { :presence => 'Ditty needs content' }
property :created_at, DateTime
end

0 comments on commit 68d0ad3

Please sign in to comment.
Something went wrong with that request. Please try again.