2016-09-24 03:00:46 +00:00
|
|
|
# frozen_string_literal: true
|
2017-11-25 19:23:47 +00:00
|
|
|
|
2016-09-21 17:22:40 +00:00
|
|
|
class Webhook < ApplicationRecord
|
2016-03-12 23:36:38 +00:00
|
|
|
belongs_to :hookable, polymorphic: true
|
|
|
|
|
|
|
|
validates :uri, presence: true
|
|
|
|
validates :hookable, presence: true
|
2016-07-26 00:14:23 +00:00
|
|
|
validates :kind, inclusion: { in: %w(slack) }
|
2016-03-12 23:36:38 +00:00
|
|
|
validates :event_types, length: { minimum: 1 }
|
|
|
|
|
|
|
|
def headers
|
|
|
|
{}
|
|
|
|
end
|
|
|
|
end
|