summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorMike Ricketts <rickettm@uk.ibm.com>2017-06-15 13:47:33 +0000
committerRémy Coutable <remy@rymai.me>2017-06-15 13:47:33 +0000
commit03b2ac659e43f39a4c6e646d0dbb5bd0a973cc38 (patch)
tree4d22335d7a35486280f063525540615f2add0a19 /app/models
parent039c375372f76050c48d6e5c39bb8322c8bf7dc5 (diff)
downloadgitlab-ce-03b2ac659e43f39a4c6e646d0dbb5bd0a973cc38.tar.gz
#13336 - display multiple messages in both the UI and git output
Diffstat (limited to 'app/models')
-rw-r--r--app/models/broadcast_message.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/broadcast_message.rb b/app/models/broadcast_message.rb
index cb40f33932a..944725d91c3 100644
--- a/app/models/broadcast_message.rb
+++ b/app/models/broadcast_message.rb
@@ -16,7 +16,7 @@ class BroadcastMessage < ActiveRecord::Base
def self.current
Rails.cache.fetch("broadcast_message_current", expires_in: 1.minute) do
- where("ends_at > :now AND starts_at <= :now", now: Time.zone.now).last
+ where('ends_at > :now AND starts_at <= :now', now: Time.zone.now).order([:created_at, :id]).to_a
end
end