Skip to content

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

DEV: Remove deprecated #pluck_first freedom patch (#24130)

Ted Johanssonac70ef929f45
diff --git a/lib/freedom_patches/pluck_first.rb b/lib/freedom_patches/pluck_first.rb
deleted file mode 100644
index 616cbad93d5..00000000000
--- a/lib/freedom_patches/pluck_first.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class ActiveRecord::Relation
- def pluck_first(*attributes)
- Discourse.deprecate("`#pluck_first` is deprecated, use `#pick` instead.")
- pick(*attributes)
- end
-
- def pluck_first!(*attributes)
- Discourse.deprecate("`#pluck_first!` is deprecated without replacement.")
- items = pick(*attributes)
-
- raise_record_not_found_exception! if items.nil?
-
- items
- end
-end
-
-module ActiveRecord::Querying
- delegate(:pluck_first, :pluck_first!, to: :all)
-end