discourse/spec
Ted Johansson 25a226279a
DEV: Replace #pluck_first freedom patch with AR #pick in core (#19893)
The #pluck_first freedom patch, first introduced by @danielwaterworth has served us well, and is used widely throughout both core and plugins. It seems to have been a common enough use case that Rails 6 introduced it's own method #pick with the exact same implementation. This allows us to retire the freedom patch and switch over to the built-in ActiveRecord method.

There is no replacement for #pluck_first!, but a quick search shows we are using this in a very limited capacity, and in some cases incorrectly (by assuming a nil return rather than an exception), which can quite easily be replaced with #pick plus some extra handling.
2023-02-13 12:39:45 +08:00
..
fabricators DEV: Create form templates (#20189) 2023-02-08 11:21:39 -08:00
fixtures DEV: declare post position as simple number in structured data (#16231) 2023-01-30 08:07:04 +01:00
helpers DEV: Replace #pluck_first freedom patch with AR #pick in core (#19893) 2023-02-13 12:39:45 +08:00
import_export DEV: Apply syntax_tree formatting to `spec/*` 2023-01-09 11:49:28 +00:00
initializers DEV: Apply syntax_tree formatting to `spec/*` 2023-01-09 11:49:28 +00:00
integration SECURITY: Default tags to show count of topics in unrestricted categories (#19916) 2023-01-20 09:50:24 +08:00
integrity FIX: Fix incorrect hashtag setting migration (#19857) 2023-01-16 10:53:00 +10:00
jobs DEV: Apply updated syntax_tree 2023-02-09 13:19:56 +00:00
lib DEV: Replace #pluck_first freedom patch with AR #pick in core (#19893) 2023-02-13 12:39:45 +08:00
mailers DEV: Apply syntax_tree formatting to `spec/*` 2023-01-09 11:49:28 +00:00
models DEV: Replace #pluck_first freedom patch with AR #pick in core (#19893) 2023-02-13 12:39:45 +08:00
multisite DEV: Apply syntax_tree formatting to `spec/*` 2023-01-09 11:49:28 +00:00
requests FIX: IconPicker option to display only available icons (#20235) 2023-02-13 09:24:47 +11:00
script/import_scripts DEV: Correct syntax_tree violations 2023-02-02 13:03:11 +00:00
serializers DEV: Improve MessageBus subscriptions for TopicTrackingState (#19767) 2023-02-01 07:18:45 +08:00
services DEV: Replace #pluck_first freedom patch with AR #pick in core (#19893) 2023-02-13 12:39:45 +08:00
support FIX: domain searches not working properly for URLs (#20136) 2023-02-03 09:55:28 +11:00
system DEV: Assign `TODO` to `@keegan` (#20224) 2023-02-08 17:01:52 -08:00
tasks FEATURE: Add rake task to mark old hashtag format for rebake (#19876) 2023-01-18 10:16:05 +10:00
views DEV: use structured data in crawler-linkback-list for referencing only (#16237) 2023-01-30 08:26:55 +01:00
rails_helper.rb DEV: Pass messageId as a dynamic segment instead of a query param (#20013) 2023-02-01 12:39:23 -03:00
regenerate_swagger_docs DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
swagger_helper.rb DEV: Apply syntax_tree formatting to `spec/*` 2023-01-09 11:49:28 +00:00