Skip to content

A platform for community discussion. Free, open, simple.

DEV: add ids method to NestedReplies::PostPreloader to resolve warning (#40010)

Mark VanLandinghame8fd81e7fdbf
diff --git a/lib/nested_replies/post_preloader.rb b/lib/nested_replies/post_preloader.rb
index 81f5681ec33..d3bf1920cb8 100644
--- a/lib/nested_replies/post_preloader.rb
+++ b/lib/nested_replies/post_preloader.rb
@@ -45,6 +45,10 @@ module NestedReplies
self
end
+ def ids
+ map(&:id)
+ end
+
def pluck(*columns)
if columns.one?
map(&columns.first)