Acts?

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.

Interesting outline/guide - thanks

Hi,

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.

Oh, those are always quite stable and build on normal Og functionality.
(If Og (or more specifically relations) are broken, those are too :P)

hierarchical.rb – acts_as_tree, but based on nested sets ( I though
Jonathan was working on materialized paths as well ? )

Well, I am using postgresql ltree, which are materialized paths, works
really good. Or rather, my Og does use it, I’m very much entagled in
new work sadly not involving ruby.

Using ltree one gets indexing and fast lookup for free and the Og
implementation facilitating the use is quite clean.

Jo