Description of problem:
When you add foreman_url to Job Template, save it. On 'Preview' button click, instead of template preview it will give you warning with error undefined method 'url_for'.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Go to Hosts -> Job Templates
2. Create new template
3. Add below code-
<%= foreman_url('built') %>
4. Save and click on 'Preview'
Giving warning -
Problem with previewing the template: error during rendering: undefined method `url_for' for #<InputTemplateRenderer:0x007f7562d01d88>. Note that you must save template input changes before you try to preview it.
It should display the preview of that template.
Created redmine issue http://projects.theforeman.org/issues/16806 from this bug
Upstream bug assigned to firstname.lastname@example.org
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16806 has been resolved.
Both patches are needed.
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16899 has been resolved.
I am fine with 6.2.z for this.
Functionality verified by test automation scripts. And it works fine for 6.3 (but not on 6.2.11 -> so cloned BZ to track progress for 6.2)
Created attachment 1307630 [details]
Screenshot of fixed issue
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
For information on the advisory, and where to find the updated files, follow the link below.
If the solution does not work for you, open a new bug report.