Started working on casted models, basic functionalities are now in.

property :casted_attribute, :cast_as => 'WithCastedModelMixin'

A casted attribute now knows about its parent. (#casted_by to retrieve the parent's object)
This commit is contained in:
Matt Aimonetti 2009-02-09 11:20:23 -08:00
parent fa7b176fce
commit 621f5565e9
10 changed files with 177 additions and 40 deletions

View file

@ -1,10 +1,5 @@
require File.dirname(__FILE__) + '/../../spec_helper'
# require File.join(FIXTURE_PATH, 'more', 'card')
# require File.join(FIXTURE_PATH, 'more', 'invoice')
# require File.join(FIXTURE_PATH, 'more', 'service')
class WithDefaultValues < CouchRest::ExtendedDocument
use_database TEST_SERVER.default_database
property :preset, :default => {:right => 10, :top_align => false}