public
Description: Some helpers for using trees in Rails
Homepage:
Clone URL: git://github.com/collectiveidea/recursable.git
Click here to lend your support to: recursable and make a donation at www.pledgie.com !
recursable / init.rb
100644 30 lines (25 sloc) 0.762 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
require 'recursable'
 
::Enumerable.extend Recursable::Enumerable
::Object.send :include, Recursable::Object
 
if defined?(ActiveRecord::Acts::Tree::InstanceMethods)
  module ActiveRecord::Acts::Tree::InstanceMethods
    include Recursable
    include Recursable::Tree
  end
end
 
if defined?(ActiveRecord::Acts::NestedSet::InstanceMethods)
  module ActiveRecord::Acts::NestedSet::InstanceMethods
    include Recursable
  end
end
 
if defined?(SymetrieCom::Acts::NestedSet::InstanceMethods)
  module SymetrieCom::Acts::NestedSet::InstanceMethods
    include Recursable
    include Recursable::NestedSet
  end
end
 
if defined?(CollectiveIdea::Acts::NestedSet::InstanceMethods)
  module CollectiveIdea::Acts::NestedSet::InstanceMethods
    include Recursable
  end
end