couchrest_model/spec/fixtures/more/card.rb
Sam Lown c280b3a29b Renaming to CouchRest Model
Refactored basic directory structure.
Moved to ActiveSupport for Validations and Callbacks.
Cleaned up older code, and removed support for text property types.
2010-06-20 22:01:11 +02:00

18 lines
380 B
Ruby

class Card < CouchRest::Model::Base
# Set the default database to use
use_database DB
# Official Schema
property :first_name
property :last_name, :alias => :family_name
property :read_only_value, :read_only => true
property :cast_alias, Person, :alias => :calias
timestamps!
# Validation
validates_presence_of :first_name
end