Skip to content

Instantly share code, notes, and snippets.

@dbussink
Created October 18, 2008 12:58
Show Gist options
  • Save dbussink/17664 to your computer and use it in GitHub Desktop.
Save dbussink/17664 to your computer and use it in GitHub Desktop.
class Feedback
include DataMapper::Resource
def self.default_repository_name; :another; end
property :id, Serial
property :name, String, :length => (1..20)
property :subject, String, :length => (10..127)
property :email, String, :format => :email_address
property :comment, Text, :length => (10..500)
property :priv, Boolean
end
DataMapper.setup(:another,:adapter => 'in_memory')
f = Feedback.new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment