Sha256: 9d72ff85b5e433f6b67b0f26513a90dedfc6cd622ce35c63cdb98019f7ca0aee

Contents?: true

Size: 388 Bytes

Versions: 53

Compression:

Stored size: 388 Bytes

Contents

class Webhooks::Outgoing::EventType < ApplicationHash
  self.data = YAML.load_file("#{Rails.root}/config/models/webhooks/outgoing/event_types.yml").map do |topic, events|
    events.map { |event| (event == "crud") ? ["created", "updated", "deleted"] : event }.flatten.map { |event| {id: "#{topic}.#{event}"} }
  end.flatten

  def label_string
    name
  end

  def name
    id
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
bullet_train-outgoing_webhooks-1.18.0 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.17.1 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.17.0 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.16.0 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.15.0 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.14.2 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.14.1 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.14.0 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.13.0 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.12.3 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.12.2 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.12.1 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.12.0 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.11.0 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.10.0 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.9.0 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.8.5 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.8.4 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.8.3 app/models/webhooks/outgoing/event_type.rb
bullet_train-outgoing_webhooks-1.8.2 app/models/webhooks/outgoing/event_type.rb