Daniel Waterworth 55a1394342 DEV: pluck_first
Doing .pluck(:column).first is a very common pattern in Discourse and in
most cases, a limit cause isn't being added. Instead of adding a limit
clause to all these callsites, this commit adds two new methods to
ActiveRecord::Relation:

pluck_first, equivalent to limit(1).pluck(*columns).first

and pluck_first! which, like other finder methods, raises an exception
when no record is found
2019-10-21 12:08:20 +01:00
..
2019-10-21 12:08:20 +01:00
2019-10-21 12:08:20 +01:00
2019-10-21 12:08:20 +01:00
2019-10-21 12:08:20 +01:00
2019-10-21 12:08:20 +01:00
2019-10-21 12:08:20 +01:00
2019-10-21 12:08:20 +01:00
2019-10-21 12:08:20 +01:00
2019-05-13 15:24:24 +01:00
2019-10-21 12:08:20 +01:00
2019-10-21 12:08:20 +01:00
2019-10-17 16:58:22 +11:00
2019-10-08 14:50:14 -04:00
2019-10-21 12:08:20 +01:00
2019-05-29 14:26:24 +10:00
2019-10-21 12:08:20 +01:00
2019-10-17 16:58:22 +11:00
2019-10-21 12:08:20 +01:00
2019-10-21 12:08:20 +01:00
2019-10-21 12:08:20 +01:00
2019-10-17 16:58:22 +11:00
2019-04-08 17:03:26 +05:30
2019-10-21 12:08:20 +01:00