discourse/app/helpers
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
..
application_helper.rb DEV: pluck_first 2019-10-21 12:08:20 +01:00
common_helper.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
email_helper.rb FEATURE: customization of html emails (#7934) 2019-07-30 15:05:08 -04:00
embed_helper.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
emoji_helper.rb FIX: ensures emoji helper is working with custom emojis (#7843) 2019-07-03 09:23:40 +02:00
list_helper.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
topics_helper.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
user_notifications_helper.rb Make `email_excerpt` method take an optional `post` param (#7570) 2019-05-20 10:04:23 +02:00