Sha256: 17d0ec77e5de67343a86f519f22b741e41349d54321b36ddd255d82331f98510

Contents?: true

Size: 674 Bytes

Versions: 10

Compression:

Stored size: 674 Bytes

Contents

require 'active_record'

module ClosureTree
  extend ActiveSupport::Autoload

  autoload :HasClosureTree
  autoload :HasClosureTreeRoot
  autoload :Support
  autoload :HierarchyMaintenance
  autoload :Model
  autoload :Finders
  autoload :HashTree
  autoload :Digraphs
  autoload :DeterministicOrdering
  autoload :NumericDeterministicOrdering
  autoload :Configuration

  def self.configure
    yield configuration
  end

  def self.configuration
    @configuration ||= Configuration.new
  end
end

ActiveSupport.on_load :active_record do
  ActiveRecord::Base.send :extend, ClosureTree::HasClosureTree
  ActiveRecord::Base.send :extend, ClosureTree::HasClosureTreeRoot
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
closure_tree-7.4.0 lib/closure_tree.rb
closure_tree-7.4.0.rc1 lib/closure_tree.rb
closure_tree-7.3.0 lib/closure_tree.rb
closure_tree-7.2.0 lib/closure_tree.rb
closure_tree-7.0.0 lib/closure_tree.rb
closure_tree-6.6.0 lib/closure_tree.rb
closure_tree-6.5.0 lib/closure_tree.rb
closure_tree-6.4.0 lib/closure_tree.rb
closure_tree-6.3.0 lib/closure_tree.rb
closure_tree-6.2.0 lib/closure_tree.rb