public
Description: A nested set for DataMapper that actually works
Homepage: http://gnexp.com
Clone URL: git://github.com/eltiare/dm-is-awesome_set.git
Jeremy Nicoll (author)
Mon Feb 23 10:48:57 -0800 2009
commit  03e3747d0802758490430b9d4e2e22d7576c5b96
tree    81bcab7a9a21d313d6e2600100b23ea28f9823bd
parent  56c939af9c9cafc29198039e73bd40344f6ad8d5
name age message
file .gitignore Mon Feb 23 10:46:37 -0800 2009 Updated README to include important information... [Jeremy Nicoll]
file LICENSE Wed Oct 22 14:48:47 -0700 2008 Initial commit after extraction [Jeremy Nicoll]
file README Mon Feb 23 10:46:37 -0800 2009 Updated README to include important information... [Jeremy Nicoll]
file Rakefile Mon Feb 23 10:48:57 -0800 2009 Forgot to bump up version number. [Jeremy Nicoll]
file TODO Fri Jan 02 03:00:30 -0800 2009 Added DataMapper discriminator support, fixed b... [Jeremy Nicoll]
directory lib/ Mon Feb 23 10:46:37 -0800 2009 Updated README to include important information... [Jeremy Nicoll]
directory spec/ Fri Jan 02 03:00:30 -0800 2009 Added DataMapper discriminator support, fixed b... [Jeremy Nicoll]
README
dm-is-awesome_set
=================

Yes, finally!  A nested_set for Datamapper that actually works!  .... at least
I _think_ it does. Please test this out and let me know at jnicoll@gnexp.com
if you run into any problems.  This readme will eventually have examples.  Until
then, check the RDoc's and you should be fine.

The latest versions of merb_datamapper by default use repository blocks which 
also enable the Identity Map. This plugin relies on dm_adjust which does not 
currently work with the Identity Map. Please add this line to your config/init.rb
file in your Merb project:

Merb::Plugins.config[:merb_datamapper][:use_repository_block] = false

If you want to activate the IM, simply wrap code in a DataMapper repository block
like so: 

DataMapper.repository do
 # Your code here
end

A quick note about discriminators:

This version enables scoping that can either include or ignore discriminators.
If you wish to scope by a discriminator, please include that column name in
the scope option. Otherwise this plugin will work with all rows regardless of
the discriminator column.