Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-08-21 00:18:42 +0300
committerDouwe Maan <douwe@selenight.nl>2017-08-21 15:09:52 +0300
commit4bfdf8406f064b9499a1dbb5e4e5abcd0616ffe0 (patch)
tree43d14852067e66b984db429d5fd03235afeadbb8 /app/models/event.rb
parente8e9c0c094749599c8fecbfb49cf1c99fe1c6c37 (diff)
Fix Error 500s when viewing user or group Atom feeds
Diffstat (limited to 'app/models/event.rb')
-rw-r--r--app/models/event.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/models/event.rb b/app/models/event.rb
index f2a560a6b56..15ee170ca75 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -83,6 +83,10 @@ class Event < ActiveRecord::Base
self.inheritance_column = 'action'
class << self
+ def model_name
+ ActiveModel::Name.new(self, nil, 'event')
+ end
+
def find_sti_class(action)
if action.to_i == PUSHED
PushEvent
@@ -438,6 +442,12 @@ class Event < ActiveRecord::Base
EventForMigration.create!(new_attributes)
end
+ def to_partial_path
+ # We are intentionally using `Event` rather than `self.class` so that
+ # subclasses also use the `Event` implementation.
+ Event._to_partial_path
+ end
+
private
def recent_update?