couchrest_model/spec/fixtures/more/card.rb

18 lines
380 B
Ruby
Raw Normal View History

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