amerine/acts_as_tree — pull request #23 by MichalPokorny (2014-04-20 12:22:26+00:00)
Title: Add leaves scope; convert roots to scope

Hi. I'd like to use acts_as_tree in a project and one thing I would like in particular is an AR scope for the leaves of the tree, but it was unfortunately missing. This patch adds it. It also converts `#roots` from a method to a scope to allow chaining.

Running the tests also complained that MiniTest::Unit::TestCase was renamed to MiniTest::Test.

I'm not sure if scopes are available in all AR versions acts_as_tree wants to support. Sorry if it's wrong to use them - I can fix that.