[Nitro] Og relationships

David Corbin dcorbin at machturtle.com
Sun Aug 7 15:02:35 EDT 2005


Is there documentation about what makes these available? (Also, I'm a bit 
behind on version wise (0.19, I think)).

> This should work, I 'll look at his.
>
> -g.
>
> On 8/7/05, David Corbin <dcorbin at machturtle.com> wrote:
> > 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
> > _______________________________________________
> > Nitro-general mailing list
> > Nitro-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/nitro-general



More information about the Nitro-general mailing list