Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed occurence of ::scoped() call which will be deprecated

  • Loading branch information...
commit b8fabf59f8a69ff621df25472b2d777bc4f75bcd 1 parent 50601ae
@Systho authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/ancestry/instance_methods.rb
View
12 lib/ancestry/instance_methods.rb
@@ -82,7 +82,7 @@ def ancestor_conditions
end
def ancestors depth_options = {}
- self.base_class.scope_depth(depth_options, depth).ordered_by_ancestry.scoped :conditions => ancestor_conditions
+ self.base_class.scope_depth(depth_options, depth).ordered_by_ancestry.where ancestor_conditions
end
def path_ids
@@ -94,7 +94,7 @@ def path_conditions
end
def path depth_options = {}
- self.base_class.scope_depth(depth_options, depth).ordered_by_ancestry.scoped :conditions => path_conditions
+ self.base_class.scope_depth(depth_options, depth).ordered_by_ancestry.where path_conditions
end
def depth
@@ -141,7 +141,7 @@ def child_conditions
end
def children
- self.base_class.scoped :conditions => child_conditions
+ self.base_class.where child_conditions
end
def child_ids
@@ -162,7 +162,7 @@ def sibling_conditions
end
def siblings
- self.base_class.scoped :conditions => sibling_conditions
+ self.base_class.where sibling_conditions
end
def sibling_ids
@@ -183,7 +183,7 @@ def descendant_conditions
end
def descendants depth_options = {}
- self.base_class.ordered_by_ancestry.scope_depth(depth_options, depth).scoped :conditions => descendant_conditions
+ self.base_class.ordered_by_ancestry.scope_depth(depth_options, depth).where descendant_conditions
end
def descendant_ids depth_options = {}
@@ -196,7 +196,7 @@ def subtree_conditions
end
def subtree depth_options = {}
- self.base_class.ordered_by_ancestry.scope_depth(depth_options, depth).scoped :conditions => subtree_conditions
+ self.base_class.ordered_by_ancestry.scope_depth(depth_options, depth).where subtree_conditions
end
def subtree_ids depth_options = {}
Please sign in to comment.
Something went wrong with that request. Please try again.