[Nitro] Og relationships

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


On Sunday 07 August 2005 03:02 pm, David Corbin wrote:
I upgraded to 0.22.  Same behavior.

> 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
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general



More information about the Nitro-general mailing list