Module: PuppetclassesHelper

Includes:
LookupKeysHelper, PuppetclassesAndEnvironmentsHelper
Defined in:
app/helpers/puppetclasses_helper.rb

Instance Method Summary collapse

Methods included from LookupKeysHelper

#add_child_link, #host_key_with_diagnostic, #hostgroup_key_with_diagnostic, #new_child_fields_template, #overridable_lookup_keys, #param_type_selector, #remove_child_link, #show_puppet_class, #validator_type_selector

Methods included from PuppetclassesAndEnvironmentsHelper

#class_update_text, #import_proxy_select

Instance Method Details

#host_counter(klass) ⇒ Object


9
10
11
12
13
14
15
# File 'app/helpers/puppetclasses_helper.rb', line 9

def host_counter klass  # workaround for sqlite bug
  # https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4544-rails3-activerecord-sqlite3-lost-column-type-when-using-views#ticket-4544-2

  @host_counter[klass.id.to_s] || @host_counter[klass.id.to_i] || 0
rescue
  _("N/A")
end

#rdoc_classes_path(environment, name) ⇒ Object


4
5
6
7
# File 'app/helpers/puppetclasses_helper.rb', line 4

def rdoc_classes_path environment, name
  klass = name.gsub('::', '/')
  "puppet/rdoc/#{environment}/classes/#{klass}.html"
end