Thanks for the help. This appears to work when I manually create a
Telephone object and then add them to the telephone_numbers of the
Contact object.
Part of my issue was my own fault as well...rails indexed fields in
a form - contact[telephone_numbers][0][telephone][number] - create
hashes, not a array with a hash..I forgot about that. I'm going to
checkout the couchrest-rails stuff to see if it has an elegant
solution to this - rather than me manually converting a hash of hashes
into an array of hashes.
Thanks!
Chad
On Nov 4, 12:35 am, Nicholas Orr <
nicholas....@zxgen.net> wrote:
> I forgot a key part...
>
> class Telephone < Hash
> include CouchRest::CastedModel
> # You have to add a casted_by accessor if you want to reach a casted
> extended doc parent
> attr_accessor :casted_by
>
> end
>
> On Wed, Nov 4, 2009 at 2:08 PM, Nicholas Orr <
nicholas....@zxgen.net> wrote:
> > This works for me.
>
> > class Telephone < Hash
> > include CouchRest::CastedModel
> > ....
> > end
>