Skip to content
Browse files

Allow for use with default scopes.

  • Loading branch information...
1 parent 43a4acb commit 0c2db691b9ef022ad52720d6b8a6681ce97b6a54 @mattiassvedhem mattiassvedhem committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/mongoid/orderable.rb
View
2 lib/mongoid/orderable.rb
@@ -113,7 +113,7 @@ def orderable_scope_changed?
def apply_position target_position
if persisted? && !embedded? && orderable_scope_changed?
- self.class.find(_id).remove_from_list
+ self.class.unscoped.find(_id).remove_from_list
self.orderable_position = nil
end

0 comments on commit 0c2db69

Please sign in to comment.
Something went wrong with that request. Please try again.