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

13 lines
278 B
Ruby
Raw Normal View History

class Webhook < ActiveRecord::Base
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