Hmm. What if instead of using SafeRenderer, you used DefaultSafeRenderer
(where UnattendedHelper is needed). Would that work (dry, can't try it
myself atm).
On Sep 16, 2013 5:06 PM, "Greg Sutcliffe" <notifications@github.com> wrote:

> In app/services/safe_render.rb:
>
> > @@ -41,4 +44,28 @@ def parse_string(string)
> >      end
> >    end
> >
> > +  # These helpers are provided as convenience methods available to the writers of templates
>
> I like the idea, but sadly it doesn't work. If I move UnattendedHelper to
> DefaultSafeRender you get a circular dependency as UnattendHelper includes
> DefaultSafeRender. I tried to move the methods in UnattendedHelper to
> DefaultSafeRender, but then become unavailable in SafeRender, eg:
>
> Failed to generate PXELinux template: undefined method `foreman_url' for #<SafeRender:0x000000072634f8>
>
> It's all quite horrible and messy, really :(
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/theforeman/foreman/pull/746/files#r6378801>
> .
>