Module: ConfigTemplatesHelper

Defined in:
app/helpers/config_templates_helper.rb

Instance Method Summary collapse

Instance Method Details

#combination(template) ⇒ Object


2
3
4
5
6
7
8
9
# File 'app/helpers/config_templates_helper.rb', line 2

def combination template
  template.template_combinations.map do |comb|
    str = []
    str << (comb.hostgroup_id.nil? ? _("None") : comb.hostgroup.to_s)
    str << (comb.environment_id.nil? ? _("None") : comb.environment.to_s)
    str.join(" / ")
  end.to_sentence
end