summaryrefslogtreecommitdiff
path: root/app/models/broadcast_message.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-05 14:20:55 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-05 14:20:55 -0800
commit62ed1c537e9b8aa85d354b377f18083fb71b8e05 (patch)
treea1b75f804b2e9384190f9d591a2f2701ea8d31db /app/models/broadcast_message.rb
parentdbca8c97588d1fcc4155b079eb54157991be3aa7 (diff)
downloadgitlab-ce-62ed1c537e9b8aa85d354b377f18083fb71b8e05.tar.gz
Explicitly define ordering in models using default_scope
Diffstat (limited to 'app/models/broadcast_message.rb')
-rw-r--r--app/models/broadcast_message.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/broadcast_message.rb b/app/models/broadcast_message.rb
index 4d0c04bcc3d..05f5e979695 100644
--- a/app/models/broadcast_message.rb
+++ b/app/models/broadcast_message.rb
@@ -14,6 +14,8 @@
#
class BroadcastMessage < ActiveRecord::Base
+ include Sortable
+
validates :message, presence: true
validates :starts_at, presence: true
validates :ends_at, presence: true