Skip to content

Commit

Permalink
Merge pull request #5 from yeggeps/patch-1
Browse files Browse the repository at this point in the history
Allow for use with default scopes.
  • Loading branch information
pyromaniac committed May 6, 2012
2 parents 43a4acb + 0c2db69 commit 1864afe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongoid/orderable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 1864afe

Please sign in to comment.