Remove alert_type attribute from BroadcastMessage
This commit is contained in:
parent
7e24c5c45a
commit
6ae39c2cd1
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class RemoveAlertTypeFromBroadcastMessages < ActiveRecord::Migration
|
||||
def change
|
||||
remove_column :broadcast_messages, :alert_type, :integer
|
||||
end
|
||||
end
|
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue