mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:47:22 +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. |
||
---|---|---|
.. | ||
application_helper.rb | ||
common_helper.rb | ||
email_helper.rb | ||
embed_helper.rb | ||
emoji_helper.rb | ||
list_helper.rb | ||
posts_helper.rb | ||
qunit_helper.rb | ||
splash_screen_helper.rb | ||
topic_post_bookmarkable_helper.rb | ||
topics_helper.rb | ||
user_notifications_helper.rb |