[Nitro] Re: Og scaffolding

George Moschovitis george.moschovitis at gmail.com
Wed Feb 23 09:35:15 EST 2005


> Now, I'd like this behaviour:
> 
> Article.__meta
> # => [Property(:title), Property(:body), HasManyRelation(:comments),
>       HasManyRelation(:categories)]
> 
> You could make the HasManyRelation a subclass of Property (or Attribute).
> 
> a = Article.__meta.first
> # => Property(:title)
> 
> a.type
> # => String
> 
> a.additional_meta
> # => {}   would return all specified hash key/values, e.g. {:ui => ... }
> 
> Article.__meta[2].foreign_class
> # => Comment
> 
> Something like this. It's much nicer to have all in one place, and be
> able to query the objects for further information.

Ok, will do it like this.

-g.

-- 
www.rubyforge.com/projects/nitro
www.joy.gr



More information about the Nitro-general mailing list