Sha256: 7c1f3ca5c93e168ef7c4783377f3e56d0e9d2788470c6e11633108be314d608b

Contents?: true

Size: 603 Bytes

Versions: 5

Compression:

Stored size: 603 Bytes

Contents

object @config_template

attributes :name, :template, :snippet, :audit_comment, :id

node do |ct|
  unless ct.template_kind.nil?
    child :template_kind do
      attributes :id, :name
    end
  else
    {:template_kind => nil}
  end
end

node do |ct|
  unless ct.template_combinations.empty?
    child :template_combinations do
      extends "api/v2/template_combinations/show"
    end
  else
    {:template_combinations => []}
  end
end

node do |ct|
  unless ct.operatingsystems.empty?
    child :operatingsystems do
      attributes :id, :name
    end
  else
    {:operatingsystems => []}
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_discovery-1.0.0 test/foreman_app/app/views/api/v2/config_templates/show.json.rabl
foreman_discovery-1.0.0.rc4 test/foreman_app/app/views/api/v2/config_templates/show.json.rabl
foreman_discovery-1.0.0.rc3 test/foreman_app/app/views/api/v2/config_templates/show.json.rabl
foreman_discovery-1.0.0.rc2 test/foreman_app/app/views/api/v2/config_templates/show.json.rabl
foreman_discovery-1.0.0.rc1 test/foreman_app/app/views/api/v2/config_templates/show.json.rabl