Actions
Bug #23796
closedtemplate param of @host.param_true? causes render error on 1.14+
Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Templates
Target version:
-
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.
Updated by Marek Hulán almost 6 years ago
- Status changed from New to Resolved
There's a bug in the documentation, it should have said in 1.14 and earlier. In 1.15 and higher, you should use
host_param_true?('parameter_name')
I've updated the wiki and closing this as resolved. Please reopen if I misunderstood the request.
Actions