diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-12-31 15:56:15 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-01-13 11:34:57 -0500 |
commit | 6ae39c2cd1edcc845136739d42baf032120e3ddc (patch) | |
tree | 93f2a7b573999151a7a897a644d15b442841c4d5 | |
parent | 7e24c5c45afe1ada044a782f27d3f3413043b1e6 (diff) | |
download | gitlab-ce-6ae39c2cd1edcc845136739d42baf032120e3ddc.tar.gz |
Remove alert_type attribute from BroadcastMessage
-rw-r--r-- | app/controllers/admin/broadcast_messages_controller.rb | 11 | ||||
-rw-r--r-- | app/models/broadcast_message.rb | 1 | ||||
-rw-r--r-- | db/migrate/20151231202530_remove_alert_type_from_broadcast_messages.rb | 5 | ||||
-rw-r--r-- | db/schema.rb | 1 | ||||
-rw-r--r-- | spec/models/broadcast_message_spec.rb | 1 |
5 files changed, 12 insertions, 7 deletions
diff --git a/app/controllers/admin/broadcast_messages_controller.rb b/app/controllers/admin/broadcast_messages_controller.rb index 497c34f8f49..bc702c022b6 100644 --- a/app/controllers/admin/broadcast_messages_controller.rb +++ b/app/controllers/admin/broadcast_messages_controller.rb @@ -31,9 +31,12 @@ class Admin::BroadcastMessagesController < Admin::ApplicationController end def broadcast_message_params - params.require(:broadcast_message).permit( - :alert_type, :color, :ends_at, :font, - :message, :starts_at - ) + params.require(:broadcast_message).permit(%i( + color + ends_at + font + message + starts_at + )) end end diff --git a/app/models/broadcast_message.rb b/app/models/broadcast_message.rb index ad514706160..da0d8a2d65f 100644 --- a/app/models/broadcast_message.rb +++ b/app/models/broadcast_message.rb @@ -6,7 +6,6 @@ # message :text not null # starts_at :datetime # ends_at :datetime -# alert_type :integer # created_at :datetime # updated_at :datetime # color :string(255) diff --git a/db/migrate/20151231202530_remove_alert_type_from_broadcast_messages.rb b/db/migrate/20151231202530_remove_alert_type_from_broadcast_messages.rb new file mode 100644 index 00000000000..78fdfeaf5cf --- /dev/null +++ b/db/migrate/20151231202530_remove_alert_type_from_broadcast_messages.rb @@ -0,0 +1,5 @@ +class RemoveAlertTypeFromBroadcastMessages < ActiveRecord::Migration + def change + remove_column :broadcast_messages, :alert_type, :integer + end +end diff --git a/db/schema.rb b/db/schema.rb index ecbe575bf83..42c3e79f9d7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -82,7 +82,6 @@ ActiveRecord::Schema.define(version: 20160113111034) do t.text "message", null: false t.datetime "starts_at" t.datetime "ends_at" - t.integer "alert_type" t.datetime "created_at" t.datetime "updated_at" t.string "color" diff --git a/spec/models/broadcast_message_spec.rb b/spec/models/broadcast_message_spec.rb index e4cac105110..001b2facaab 100644 --- a/spec/models/broadcast_message_spec.rb +++ b/spec/models/broadcast_message_spec.rb @@ -6,7 +6,6 @@ # message :text not null # starts_at :datetime # ends_at :datetime -# alert_type :integer # created_at :datetime # updated_at :datetime # color :string(255) |