fix the broken tests

This commit is contained in:
Didier Lafforgue 2012-02-21 01:45:45 +01:00
parent fa2cd996ce
commit c6e1276974
1 changed files with 1 additions and 4 deletions

View File

@ -19,9 +19,6 @@ module Locomotive
## indexes ## ## indexes ##
index :position index :position
index [:depth.asc, :position.asc] index [:depth.asc, :position.asc]
## scopes ##
default_scope :where => {} # disable the default_scope from the Mongoid::Tree gem
end end
module ClassMethods module ClassMethods
@ -36,7 +33,7 @@ module Locomotive
# @return [ Array ] The first array of pages (depth = 0) # @return [ Array ] The first array of pages (depth = 0)
# #
def quick_tree(site, minimal_attributes = true) def quick_tree(site, minimal_attributes = true)
pages = (minimal_attributes ? site.pages.minimal_attributes : site.pages).order_by([:depth.asc, :position.asc]).to_a pages = (minimal_attributes ? site.pages.unscoped.minimal_attributes : site.pages.unscoped).order_by([:depth.asc, :position.asc]).to_a
tmp = [] tmp = []