c280b3a29b
Refactored basic directory structure. Moved to ActiveSupport for Validations and Callbacks. Cleaned up older code, and removed support for text property types.
18 lines
380 B
Ruby
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
|