[Nitro] Og and Relations/Queries

Emmanuel Piperakis epiperak at softlab.ece.ntua.gr
Mon Sep 5 03:47:27 EDT 2005


> 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? :-/


Emmanouil Piperakis (epiperak at cs.ntua.gr)
{To explore is Human, to Create is Devine,
  To teach is Primal, to Rule is Sin}



More information about the Nitro-general mailing list