Sha256: 865e37b94731f1e216fe3b93b41e03121989a0100674d0bf8c952915876b02f7

Contents?: true

Size: 542 Bytes

Versions: 12

Compression:

Stored size: 542 Bytes

Contents

object @template

attributes :id, :snippet, :locked

node(:kind) do |template|
  template.template_kind.name if template.respond_to?(:template_kind) && template.template_kind
end

node(:class_name) do |template|
  template.class.name
end

node(:humanized_class_name) do |template|
  template.class.name.underscore.split('_').map { |part| part.capitalize }.join(' ')
end

node(:can_edit) do |template|
  authorized_for(:auth_object => template, :authorizer => authorizer, :permission => "edit_#{template.class.name.underscore.pluralize}")
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
foreman_templates-9.0.2 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-9.0.1 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-9.0.0 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-7.0.7 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-8.0.0 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-7.0.6 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-7.0.5 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-7.0.4 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-7.0.3 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-7.0.2 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-7.0.1 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-7.0.0 app/views/ui_template_syncs/template_attrs.json.rabl