mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 22:53:56 +08:00
25a226279a
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. |
||
---|---|---|
.. | ||
001_refresh.rb | ||
002_groups.rb | ||
003_post_action_types.rb | ||
004_screened_ip_addresses.rb | ||
005_badge_types.rb | ||
006_badges.rb | ||
007_web_hook_event_types.rb | ||
009_users.rb | ||
010_uploads.rb | ||
500_categories.rb | ||
600_themes.rb | ||
990_settings.rb | ||
990_topics.rb |