fix event issue when event for left project + project removed
This commit is contained in:
parent
dc37c8aaae
commit
759fb518eb
2 changed files with 23 additions and 15 deletions
|
@ -42,6 +42,14 @@ class Event < ActiveRecord::Base
|
||||||
push? || issue? || merge_request? || membership_changed?
|
push? || issue? || merge_request? || membership_changed?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def project_name
|
||||||
|
if project
|
||||||
|
project.name
|
||||||
|
else
|
||||||
|
"(deleted)"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def push?
|
def push?
|
||||||
action == self.class::Pushed && valid_push?
|
action == self.class::Pushed && valid_push?
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
%strong #{event.author_name}
|
%strong #{event.author_name}
|
||||||
%span.event_label{class: event.action_name}= event.action_name
|
%span.event_label{class: event.action_name}= event.action_name
|
||||||
project
|
project
|
||||||
%strong= link_to event.project.name, event.project
|
%strong= link_to event.project_name, event.project
|
||||||
%span.cgray
|
%span.cgray
|
||||||
= time_ago_in_words(event.created_at)
|
= time_ago_in_words(event.created_at)
|
||||||
ago.
|
ago.
|
||||||
|
|
Loading…
Reference in a new issue