[Nitro] Og and Relations/Queries

George Moschovitis george.moschovitis at gmail.com
Mon Sep 5 03:39:39 EDT 2005


Btw, the latest Og (0.23.0) has more advanced inflection capabilities:

class User
    property :login,  String
    has_many :groups
end

class Group
    property   :name,     String
    belongs_to :user
    has_many :projects
end
 
class Project
   belongs_to :group
end


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.

-g.

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




More information about the Nitro-general mailing list