[Nitro] Og relationships
David Corbin
dcorbin at machturtle.com
Sun Aug 7 11:53:13 EDT 2005
I have something like this:
class Foo
has_many :bars
def sna
bars << Bar.new
end
end
It complains that there is no bars. I've dug around, and I've not been able to figure out what methods the 'has_many' provides. What's the right way to add a Bar to a Foo in this case?
Logic tells me I need to initialize an "@bars = []", (and that does make the immediate problems go away), but I can find no example that shows that. Does has_many also provide 'accessors'?
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20050807/37372a6b/attachment.html
More information about the Nitro-general
mailing list