[Nitro] Og and Relations/Queries

George Moschovitis george.moschovitis at gmail.com
Mon Sep 5 04:05:07 EDT 2005


On 9/5/05, Emmanuel Piperakis <epiperak at softlab.ece.ntua.gr> wrote:
> > in general the following forms work:
> >
> > has_many :projects, Project
> > has_many Project
> > has_many :projects
> >
> > all three are equivalent. I personally prefer the 3rd.
> 
> Thank you for your reply, but my question is How can I make the queries.
> So if I want all the projects that belong to any of the groups of the
> current user would the following line work?
> 
> @projects = User[session[:user_oid]].groups.projects
> 
> and would it return an array of projects as I would expect?
> 
> Thanx again...
> 
> PS. When is the new server coming up online? :-/
> 
> 

I said 'yes', this would work :-)

-g.

-- 
http://www.gmosx.com
http://www.navel.gr
http://www.nitrohq.com




More information about the Nitro-general mailing list