diff options
author | Mike Ricketts <rickettm@uk.ibm.com> | 2017-06-15 16:47:33 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-06-15 16:47:33 +0300 |
commit | 03b2ac659e43f39a4c6e646d0dbb5bd0a973cc38 (patch) | |
tree | 4d22335d7a35486280f063525540615f2add0a19 /app/models/broadcast_message.rb | |
parent | 039c375372f76050c48d6e5c39bb8322c8bf7dc5 (diff) |
#13336 - display multiple messages in both the UI and git output
Diffstat (limited to 'app/models/broadcast_message.rb')
-rw-r--r-- | app/models/broadcast_message.rb | 2 |
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 |