about summary refs log tree commit diff
path: root/app/models/account_warning_preset.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-03-12 17:57:59 +0100
committerGitHub <noreply@github.com>2020-03-12 17:57:59 +0100
commitf556f79b7733834430b93109ac2c7f87529c8574 (patch)
tree27686f762b65eff63f06f173542a749e52991397 /app/models/account_warning_preset.rb
parentaeebbe90dc8224ae8bc9ac81fb68435105edb293 (diff)
Add titles to warning presets in admin UI (#13252)
Diffstat (limited to 'app/models/account_warning_preset.rb')
-rw-r--r--app/models/account_warning_preset.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/account_warning_preset.rb b/app/models/account_warning_preset.rb
index ba8ceabb3..c20f683cf 100644
--- a/app/models/account_warning_preset.rb
+++ b/app/models/account_warning_preset.rb
@@ -8,8 +8,11 @@
 #  text       :text             default(""), not null
 #  created_at :datetime         not null
 #  updated_at :datetime         not null
+#  title      :string           default(""), not null
 #
 
 class AccountWarningPreset < ApplicationRecord
   validates :text, presence: true
+
+  scope :alphabetic, -> { order(title: :asc, text: :asc) }
 end