Commit 31d1b2ca authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Simplify project check with duck typing

parent a8c523d9
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment