Module: TheSortableTree::Scopes

Defined in:
lib/the_sortable_tree.rb

Overview

include TheSortableTree::Scopes

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



11
12
13
14
15
16
# File 'lib/the_sortable_tree.rb', line 11

def self.included(base)
  base.class_eval do
    scope :nested_set,          order_by( [[ :lft, :asc ]])
    scope :reversed_nested_set, order('lft DESC')
  end
end