From 41256bd72346ce50817748d51a4291d9728819b3 Mon Sep 17 00:00:00 2001 From: Veselin Stoyanov Date: Mon, 25 Apr 2016 15:35:36 +0300 Subject: [PATCH] Fixed Rails 5 Active Record method name collision. --- lib/closure_tree/finders.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/closure_tree/finders.rb b/lib/closure_tree/finders.rb index 3e0a69dd..490efe05 100644 --- a/lib/closure_tree/finders.rb +++ b/lib/closure_tree/finders.rb @@ -47,12 +47,12 @@ def find_all_by_generation(generation_level) end def without_self(scope) - scope.without(self) + scope.without_instance(self) end module ClassMethods - def without(instance) + def without_instance(instance) if instance.new_record? all else