diff --git a/lib/closure_tree/acts_as_tree.rb b/lib/closure_tree/acts_as_tree.rb index ca6efe8a..a86dd14c 100644 --- a/lib/closure_tree/acts_as_tree.rb +++ b/lib/closure_tree/acts_as_tree.rb @@ -352,7 +352,7 @@ def without_self(scope) end def ids_from(scope) - scope.select(:id).collect(&:id) + scope.try(:pluck, :id) || scope.select(:id).collect(&:id) end