lib/nested_set/base.rb in nested_set-1.6.5 vs lib/nested_set/base.rb in nested_set-1.6.6
- old
+ new
@@ -57,9 +57,15 @@
end
class_attribute :acts_as_nested_set_options
self.acts_as_nested_set_options = options
+ class_attribute :use_depth
+ self.use_depth = self.base_class.column_names.include?(self.base_class.acts_as_nested_set_options[:depth_column])
+
+ #backward compatibility
+ alias_method :depth?, :use_depth
+
unless self.is_a?(ClassMethods)
include Comparable
include Columns
include InstanceMethods