Class: WebhookTemplate

Inherits:
Template
  • Object
show all
Extended by:
FriendlyId
Includes:
Authorizable, Parameterizable::ByIdName, Taxonomix
Defined in:
app/models/webhook_template.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.acceptable_template_input_typesObject



50
51
52
# File 'app/models/webhook_template.rb', line 50

def self.acceptable_template_input_types
  [:user]
end

.base_classObject

we have to override the base_class because polymorphic associations does not detect it correctly, more details at apidock.com/rails/ActiveRecord/Associations/ClassMethods/has_many#1010-Polymorphic-has-many-within-inherited-class-gotcha



16
17
18
# File 'app/models/webhook_template.rb', line 16

def base_class
  self
end

.default_render_scope_classObject



42
43
44
# File 'app/models/webhook_template.rb', line 42

def self.default_render_scope_class
  ForemanWebhooks::Renderer::Scope::WebhookTemplate
end

.log_render_results?Boolean

Returns:

  • (Boolean)


54
55
56
# File 'app/models/webhook_template.rb', line 54

def self.log_render_results?
  true
end

Instance Method Details

#support_preview?Boolean

Returns:

  • (Boolean)


62
63
64
# File 'app/models/webhook_template.rb', line 62

def support_preview?
  false
end

#support_single_host_render?Boolean

Returns:

  • (Boolean)


58
59
60
# File 'app/models/webhook_template.rb', line 58

def support_single_host_render?
  false
end

#taxonomy_foreign_conditionsObject



46
47
48
# File 'app/models/webhook_template.rb', line 46

def taxonomy_foreign_conditions
  { webhook_template_id: id }
end