Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Article
- include DataMapper::Resource
- include DataMapper::Validate
- property :id, Fixnum, :serial => true
- property :title, String, :length => 200, :nullable => false, :index => :unique
- property :permalink, String, :length => 400, :nullable => false
- validates_presence_of :title
- validates_presence_of :permalink
- end
Add Comment
Please, Sign In to add comment