[Nitro] acts?

Robert Mela rob at robmela.com
Sat Oct 27 23:15:17 EDT 2007

I see some stuff in the og/model directory that corresponds to some of 
the common Rails acts_as mixins.

I'm curious as to what stage of completion/reliability these things are 
at.  Also, are there other commonly used rails acts mixins that should 
be added to this list?    For others, would revisable in some way 
obviate the need for acts_as_paranoid?

What I see are:

hierarchical.rb -- acts_as_tree, but based on nested sets ( I though 
Jonathan was working on materialized paths as well ? )
orderable.rb -- acts_as_list ?
searchable.rb -- default suitable for small applications only:   
condition = search_props.collect { |p| "#{p} LIKE '%#{query}%'" }.join(' 
OR ')
revisable.rb -- WOW! -- revisions and rollbacks for models ( what's the 
corresponding Rails acts_as? )
taggable.rb -- creates a Tag table and many_to_many relationship for 
class that includes it
timestamped.rb -- creates and maintains timestamp columns for create, 
update, and access for including class
cacheable.rb -- mixin that automatically adds cache handling code to 
class ( where is the cache implementation decided -- in Og
optimistic_locking.rb -- yeah!
uuid.rb -- uuid keys instead of autoincrement --  insures uniqueness 
across databases that may be merged ( autoincrement does not )
sti.rb -- all inheriting classes are stored in same table as base class.

I'm also unclear on the workings of sti.rb, but I guess I could figure 
it out with some experimentation.  At it's core it seems to work by 
adding an ogtype column to the table.  
But I wonder what it does for inheriting types that have additonal 
attributes -- does it add columns?   How is inheritance reflected in the 
schema without STI?    New tables?

No need to answer if yer busy.   I can experiment.   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rob.vcf
Type: text/x-vcard
Size: 116 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20071027/5bfb4546/attachment.vcf 

More information about the Nitro-general mailing list