Permalink
Browse files

remove_order_by was broken for Mongoid 3

  • Loading branch information...
1 parent a837cdc commit 3f5e3421fc7f93fa91d26ab87e7b0b0e04d6f754 @asavartsov committed May 22, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/mongoid_nested_set/remove_order_by.rb
@@ -1,11 +1,15 @@
module Mongoid
module Criterion
- module Optional
+ module Ordering
def remove_order_by
@options[:sort] = nil
self
end
end
end
+
+ class Criteria
+ include Criterion::Ordering
+ end
end

0 comments on commit 3f5e342

Please sign in to comment.