discourse/app/jobs
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
..
concerns DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
onceoff FIX: More encoded slug fixes (#8191) 2019-10-16 17:08:43 -03:00
regular DEV: pluck_first 2019-10-21 12:08:20 +01:00
scheduled DEV: prevents redefinition of various constants (#8199) 2019-10-17 09:18:07 +02:00
base.rb FIX: Zeitwerk-related fixes for jobs. (#8187) 2019-10-14 13:03:22 +03:00