Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/broadcast_message.rb')
-rw-r--r--app/models/broadcast_message.rb29
1 files changed, 0 insertions, 29 deletions
diff --git a/app/models/broadcast_message.rb b/app/models/broadcast_message.rb
deleted file mode 100644
index 05f5e979695..00000000000
--- a/app/models/broadcast_message.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# == Schema Information
-#
-# Table name: broadcast_messages
-#
-# id :integer not null, primary key
-# message :text not null
-# starts_at :datetime
-# ends_at :datetime
-# alert_type :integer
-# created_at :datetime
-# updated_at :datetime
-# color :string(255)
-# font :string(255)
-#
-
-class BroadcastMessage < ActiveRecord::Base
- include Sortable
-
- validates :message, presence: true
- validates :starts_at, presence: true
- validates :ends_at, presence: true
-
- validates :color, format: { with: /\A\#[0-9A-Fa-f]{3}{1,2}+\Z/ }, allow_blank: true
- validates :font, format: { with: /\A\#[0-9A-Fa-f]{3}{1,2}+\Z/ }, allow_blank: true
-
- def self.current
- where("ends_at > :now AND starts_at < :now", now: Time.zone.now).last
- end
-end