Sha256: af8b3bd2a51866ce415e8ac8f773769cd78bd88c6aa7ca4f964f22e5fc168edf

Contents?: true

Size: 529 Bytes

Versions: 12

Compression:

Stored size: 529 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(&: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-10.0.2 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-10.0.1 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-10.0.0 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-9.5.1 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-9.5.0 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-9.3.3 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-9.3.2 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-9.3.1 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-9.4.0 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-9.3.0 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-9.2.0 app/views/ui_template_syncs/template_attrs.json.rabl
foreman_templates-9.1.0 app/views/ui_template_syncs/template_attrs.json.rabl