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. |
||
|---|---|---|
| .. | ||
| admin_confirmation_mailer.rb | ||
| download_backup_mailer.rb | ||
| group_smtp_mailer.rb | ||
| invite_mailer.rb | ||
| rejection_mailer.rb | ||
| subscription_mailer.rb | ||
| test_mailer.rb | ||
| user_notifications.rb | ||
| version_mailer.rb | ||