Skip to content

Commit

Permalink
Merge pull request #49 from ares/fix/11594
Browse files Browse the repository at this point in the history
Fixes #11594 - snippets can be used in job templates
  • Loading branch information
ares committed Oct 1, 2015
2 parents 5120bc6 + 3728831 commit 3f45745
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/models/input_template_renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def initialize(template, host = nil, invocation = nil)
end

def render
render_safe(@template.template, [ :input ], :host => @host)
render_safe(@template.template, ::Foreman::Renderer::ALLOWED_HELPERS + [ :input ], :host => @host)
rescue => e
self.error_message ||= _('error during rendering: %s') % e.message
Rails.logger.debug e.to_s + "\n" + e.backtrace.join("\n")
Expand All @@ -39,4 +39,8 @@ def input(name)
raise UndefinedInput, "Rendering failed, no input with name #{name} for input macro found"
end
end

def logger
Rails.logger
end
end

0 comments on commit 3f45745

Please sign in to comment.