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:
authorMayra Cabrera <mcabrera@gitlab.com>2018-04-06 00:04:42 +0300
committerGrzegorz Bizon <grzegorz@gitlab.com>2018-04-06 00:04:42 +0300
commitd54cf868f81ca957c8322661b11e6755d9ea5a85 (patch)
tree39ef104a65a13fc41a5fcc3a79b9e1ec9c154d3d /app/models/concerns/presentable.rb
parentdd271e246001a06609592eef109d154291305d32 (diff)
Resolve "Show `failure_reason` and upgrade tooltips of jobs"
Diffstat (limited to 'app/models/concerns/presentable.rb')
-rw-r--r--app/models/concerns/presentable.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/concerns/presentable.rb b/app/models/concerns/presentable.rb
index 7b33b837004..bc4fbd19a02 100644
--- a/app/models/concerns/presentable.rb
+++ b/app/models/concerns/presentable.rb
@@ -1,4 +1,12 @@
module Presentable
+ extend ActiveSupport::Concern
+
+ class_methods do
+ def present(attributes)
+ all.map { |klass_object| klass_object.present(attributes) }
+ end
+ end
+
def present(**attributes)
Gitlab::View::Presenter::Factory
.new(self, attributes)