Skip to content
Browse files

Use autoload instead of require

  • Loading branch information...
1 parent 422f4a0 commit abccd7308c2644b0d471e109ce4fda80b998eeea @benedikt committed Nov 3, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/mongoid/tree.rb
View
6 lib/mongoid/tree.rb
@@ -1,6 +1,3 @@
-require 'mongoid/tree/ordering'
-require 'mongoid/tree/traversal'
-
module Mongoid # :nodoc:
##
# = Mongoid::Tree
@@ -82,6 +79,9 @@ module Mongoid # :nodoc:
module Tree
extend ActiveSupport::Concern
+ autoload :Ordering, 'mongoid/tree/ordering'
+ autoload :Traversal, 'mongoid/tree/traversal'
+
included do
references_many :children, :class_name => self.name, :foreign_key => :parent_id, :inverse_of => :parent do
def <<(*objects)

0 comments on commit abccd73

Please sign in to comment.
Something went wrong with that request. Please try again.