No title Revision 03341deff38e (Tue Dec 16 2008 at 17:13) - Diff Link to this snippet: https://friendpaste.com/2YBebSb8eQYVfMkPo94sEe Embed: manni perldoc borland colorful default murphy trac fruity autumn bw emacs pastie friendly Show line numbers Wrap lines 1234567891011121314151617181920require 'rubygems'require 'couchrest'class Test < CouchRest::Model use_database CouchRest.database('http://localhost:5984/my_db') set_default :array => []end>> n = Test.new=> {"array"=>[], "couchrest-type"=>"Test"}>> Test.default[:array].object_id=> 13129040>> n['array'].object_id=> 13129040>> n['array'] << "Hello, kitty"=> ["Hello, kitty"]>> Test.default[:array]=> ["Hello, kitty"]>> n2 = Test.new=> {"array"=>["Hello, kitty"], "couchrest-type"=>"Test"}