Project

General

Profile

Actions

Bug #23796

closed

template param of @host.param_true? causes render error on 1.14+

Added by Jeff Sparrow almost 6 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Templates
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

According to both the help page on templates and the template writing guide: https://projects.theforeman.org/projects/foreman/wiki/TemplateWriting#Host-or-host-group-parameters
the follow syntax should work in templates:

@host.param_true?('parameter_name')
@host.param_false?('parameter_name')

However, the use of param_true? throws an exception error:

Warning! There was an error rendering the Community Preseed default template: undefined method `param_true?' for # Did you mean? parameters_url

Changing the syntax back to old style host_param_true?('parameter_name') resolves the issue and allows the template to render.

Actions

Also available in: Atom PDF