Skip to content

Commit

Permalink
no longer supporting rails 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrock committed Apr 17, 2018
1 parent f90c10b commit 80a3aa1
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/ancestry/class_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,7 @@ def rebuild_depth_cache!
end

def unscoped_where
if ActiveRecord::VERSION::MAJOR < 4
self.ancestry_base_class.unscoped do
yield self.ancestry_base_class
end
else
yield self.ancestry_base_class.unscope(:where)
end
yield self.ancestry_base_class.unscope(:where)
end
end
end

0 comments on commit 80a3aa1

Please sign in to comment.