Sha256: 984c576bd7e17d9941c693313d942c63ce760a7d1a95fe97e2c49fc62559a487

Contents?: true

Size: 347 Bytes

Versions: 1

Compression:

Stored size: 347 Bytes

Contents

require "the_sortable_tree/engine"
require "the_sortable_tree/version"

# include TheSortableTree::Scopes
module TheSortableTree
  module Scopes
    def self.included(base)
      base.class_eval do
        scope :nested_set,          -> { order('lft ASC')  }
        scope :reversed_nested_set, -> { order('lft DESC') }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
the_sortable_tree-2.0.0 lib/the_sortable_tree.rb