FIX bug
This commit is contained in:
parent
1a22491e36
commit
5bd33c033c
|
@ -0,0 +1,14 @@
|
||||||
|
module Admins::ProjectsHelper
|
||||||
|
|
||||||
|
def link_to_project(project)
|
||||||
|
owner = project.owner
|
||||||
|
|
||||||
|
if owner.is_a?(User)
|
||||||
|
link_to(project.owner&.real_name, "/users/#{project&.owner&.login}", target: '_blank')
|
||||||
|
elsif owner.is_a?(Organization)
|
||||||
|
link_to(project.owner&.real_name, "/organize/#{project&.owner&.login}", target: '_blank')
|
||||||
|
else
|
||||||
|
""
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue