Oh right, made last minute change on that line. Fixed :-)

Good catch thanks

LZ

On Mon, Feb 10, 2014 at 05:30:18AM -0800, Dominic Cleal wrote:
> > @@ -39,5 +39,11 @@ def authorized?
> >        false
> >      end
> >  
> > +    private
> > +
> > +    def add_relative_path(path)
> > +      rurl = @context.config.action_controller.relative_url_root
> > +      rurl.present? && !path.start_with?(rurl.end_with? '/' ? rurl : "#{rurl}/") ? "#{rurl}#{path}" : path
> 
> When running with a relative URL, this blows up for me:
> 
> <pre>
> ActionView::Template::Error (no implicit conversion of true into String):
>   app/services/menu/item.rb:46:in `start_with?'
>   app/services/menu/item.rb:46:in `add_relative_path'
>   app/services/menu/item.rb:24:in `url'
> </pre>
> 
> I suspect you need brackets for `end_with?('/')` due to precedence.
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/theforeman/foreman/pull/1167/files#r9583377

-- 
Later,

 Lukas "lzap" Zapletal
 irc: lzap #theforeman