metamaps--metamaps/app/models/webhook.rb

15 lines
308 B
Ruby
Raw Permalink Normal View History

2016-09-24 03:00:46 +00:00
# frozen_string_literal: true
2017-11-25 19:23:47 +00:00
class Webhook < ApplicationRecord
belongs_to :hookable, polymorphic: true
validates :uri, presence: true
validates :hookable, presence: true
validates :kind, inclusion: { in: %w[slack] }
validates :event_types, length: { minimum: 1 }
def headers
{}
end
end