diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-02-22 19:55:35 +0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-02-22 19:59:15 +0300 |
commit | 31d1b2ca8c338281f3fac6dd862c988b721fa39d (patch) | |
tree | 79e70898907e5a1d57cf3c326fb5041011dad806 | |
parent | a8c523d98b7dc18eae973b70e7743e8551dc09fd (diff) |
Simplify project check with duck typing
-rw-r--r-- | app/helpers/application_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7b71f636397..475341cf9b1 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -34,7 +34,7 @@ module ApplicationHelper def project_icon(project_id, options = {}) project = - if project_id.is_a?(Project) || project_id.is_a?(ProjectPresenter) + if project_id.respond_to?(:avatar_url) project_id else Project.find_by_full_path(project_id) |