theforeman/foreman — pull request #1167 by lzap (2014-01-17 17:01:28+00:00)
Title: fixes #3903 - fixed menu links when relative URLs are set

Ok this is hack, @abedari. Calling url_for via Application is not the same as
in context. It's ActionDispatch::Routing::RouteSet.url_for vs
ActionView::Helpers::UrlHelper.url_for. The former ignores relative_url setting
of the Rails application.

I could not figure out how to pass correct context/engine from menu builder,
thus this hack - we simply add the prefix if it is configured in Rails app.

If anyone knows, enlighten me. These are Rails internals I am not familiar
with.