Skip to content

Instantly share code, notes, and snippets.

@nickmartini
Created July 31, 2009 20:48
Show Gist options
  • Save nickmartini/159445 to your computer and use it in GitHub Desktop.
Save nickmartini/159445 to your computer and use it in GitHub Desktop.
require 'pp'
require 'rubygems'
require 'relaxdb'
RelaxDB.configure :host => "localhost", :port => 5984, :design_doc => "app"
RelaxDB.use_db "music_scratch"
RelaxDB.enable_view_creation # creates views when class definition is executed
class Album < RelaxDB::Document
property :created_at
property :updated_at
property :artist, :validator => :required
property :title, :validator => :required
property :released
property :tracks
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment