diff options
Diffstat (limited to 'lib/gitlab/url_builder.rb')
-rw-r--r-- | lib/gitlab/url_builder.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/gitlab/url_builder.rb b/lib/gitlab/url_builder.rb index 4bedf7a301e..cc53e3b7577 100644 --- a/lib/gitlab/url_builder.rb +++ b/lib/gitlab/url_builder.rb @@ -13,7 +13,8 @@ module Gitlab end def url - case object + # Objects are sometimes wrapped in a BatchLoader instance + case object.itself when Commit commit_url when Issue @@ -33,7 +34,7 @@ module Gitlab when User user_url(object) else - raise NotImplementedError.new("No URL builder defined for #{object.class}") + raise NotImplementedError.new("No URL builder defined for #{object.inspect}") end end |