[Nitro] Og examples
itsme213
itsme213 at hotmail.com
Thu Nov 24 17:56:11 EST 2005
Thanks again Bryan.
I have no idea what
property :domain, []
means, and can't find any place to look.
----- Original Message -----
From: Bryan Soto
To: General discussion about Nitro
Sent: Thursday, November 24, 2005 12:18 AM
Subject: Re: [Nitro] Og examples
Here's a working version. Hopefully it's enough to give you a start. Passing [] as the type for :domain works for storing class A as it's done via YAML and should load correctly. I'm not sure why it's necessary though...
------------------------------------------
require 'og'
class A; end
class B
property :domain, []
end
Og.setup(
:database => 'test',
# :base_dir => 'other_directory_name', # In case you don't want kirbydb
:store => :kirby
)
r = B.new
o = A.new
r.domain = o
puts r.domain
r.save
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051124/0c6112e1/attachment.html
More information about the Nitro-general
mailing list